Class: CouchView::Config::Conditions
- Inherits:
-
Object
- Object
- CouchView::Config::Conditions
- Defined in:
- lib/couch_view/conditions.rb
Instance Attribute Summary (collapse)
-
- (Object) conditions
readonly
Returns the value of attribute conditions.
Instance Method Summary (collapse)
- - (Object) add_conditions(*args) (also: #add_condition)
-
- (Conditions) initialize(*conditions)
constructor
A new instance of Conditions.
- - (Object) method_missing(condition_name, *args, &block)
Constructor Details
- (Conditions) initialize(*conditions)
A new instance of Conditions
6 7 8 9 |
# File 'lib/couch_view/conditions.rb', line 6 def initialize(*conditions) @conditions = {} add_condition_modules conditions end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(condition_name, *args, &block)
17 18 19 20 21 22 |
# File 'lib/couch_view/conditions.rb', line 17 def method_missing(condition_name, *args, &block) super if block super unless args.count == 1 add_condition_module condition_name, args.first end |
Instance Attribute Details
- (Object) conditions (readonly)
Returns the value of attribute conditions
4 5 6 |
# File 'lib/couch_view/conditions.rb', line 4 def conditions @conditions end |
Instance Method Details
- (Object) add_conditions(*args) Also known as: add_condition
11 12 13 |
# File 'lib/couch_view/conditions.rb', line 11 def add_conditions(*args) add_condition_modules args end |