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

- (QueryOptions) initialize(view_proxy, options = {})

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

- (Object) method_missing(option_name, *args, &block)



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

- (Object) options (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

- (Object) to_hash



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

def to_hash
  @options
end