Sha256: 20492e31718f05ad29aa22d981248c936edd837343384b6f1d2541a6abdbff34

Contents?: true

Size: 644 Bytes

Versions: 9

Compression:

Stored size: 644 Bytes

Contents

module CouchPotato
  module View
    class BaseViewSpec
      attr_reader :reduce_function, :design_document, :view_name, :view_parameters, :klass, :options
      private :klass, :options
      
      def initialize(klass, view_name, options, view_parameters)
        @klass = klass
        @design_document = klass.to_s.underscore
        @view_name = view_name
        @options = options
        @view_parameters = options.select{|key, value| [:group, :include_docs, :descending, :group_level, :limit].include?(key.to_sym)}.merge(view_parameters)
      end
      
      def process_results(results)
        results
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
langalex-couch_potato-0.2.0 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.1 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.2 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.3 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.4 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.5 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.6 lib/couch_potato/view/base_view_spec.rb
speedmax-couch_potato-0.2.0 lib/couch_potato/view/base_view_spec.rb
speedmax-couch_potato-0.2.2 lib/couch_potato/view/base_view_spec.rb