Class: CouchView::QueryOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/couch_view/query_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view_proxy, options = {}) ⇒ QueryOptions

Returns a new instance of QueryOptions.



5
6
7
8
# File 'lib/couch_view/query_options.rb', line 5

def initialize(view_proxy, options={})
  @view_proxy = view_proxy
  @options    = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(option_name, *args, &block) ⇒ Object



10
11
12
# File 'lib/couch_view/query_options.rb', line 10

def method_missing(option_name, *args, &block)
  set_query_option option_name.to_s, args.first
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/couch_view/query_options.rb', line 3

def options
  @options
end

Instance Method Details

#to_hashObject



14
15
16
# File 'lib/couch_view/query_options.rb', line 14

def to_hash
  @options
end