Sha256: 3a178bae0dde3945afe55cccbcb9aa4f3da54970dc0e83df522bbf4a6d2dda24

Contents?: true

Size: 717 Bytes

Versions: 19

Compression:

Stored size: 717 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 = {}
        [:group, :include_docs, :descending, :group_level, :limit].each do |key|
          @view_parameters[key] = options[key] if options.include?(key)
        end
        @view_parameters.merge!(view_parameters)
      end

      def process_results(results)
        results
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 4 rubygems

Version Path
andrewtimberlake-couch_potato-0.2.8.1 lib/couch_potato/view/base_view_spec.rb
andrewtimberlake-couch_potato-0.2.8.2 lib/couch_potato/view/base_view_spec.rb
andrewtimberlake-couch_potato-0.2.8.3 lib/couch_potato/view/base_view_spec.rb
andrewtimberlake-couch_potato-0.2.8.4 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.11 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.12 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.7 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.8 lib/couch_potato/view/base_view_spec.rb
langalex-couch_potato-0.2.9 lib/couch_potato/view/base_view_spec.rb
thefool808-couch_potato-0.2.7 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.20 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.19 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.18 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.17 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.16 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.15 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.14 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.13 lib/couch_potato/view/base_view_spec.rb
couch_potato-0.2.12 lib/couch_potato/view/base_view_spec.rb