Class: CouchView::QueryOptions
- Inherits:
-
Object
- Object
- CouchView::QueryOptions
- Defined in:
- lib/couch_view/query_options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(view_proxy, options = {}) ⇒ QueryOptions
constructor
A new instance of QueryOptions.
- #method_missing(option_name, *args, &block) ⇒ Object
- #to_hash ⇒ Object
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, ={}) @view_proxy = view_proxy @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
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/couch_view/query_options.rb', line 3 def @options end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 |
# File 'lib/couch_view/query_options.rb', line 14 def to_hash @options end |