Class: Datapathy::Query::ConditionSet
- Inherits:
- ActiveSupport::BasicObject
- Defined in:
- lib/datapathy/query.rb
Instance Method Summary collapse
-
#initialize ⇒ ConditionSet
constructor
A new instance of ConditionSet.
- #inspect ⇒ Object
- #method_missing(method_name, *args, &blk) ⇒ Object
Constructor Details
permalink #initialize ⇒ ConditionSet
Returns a new instance of ConditionSet.
98 99 100 |
# File 'lib/datapathy/query.rb', line 98 def initialize @conditions = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
permalink #method_missing(method_name, *args, &blk) ⇒ Object
[View source]
102 103 104 105 106 |
# File 'lib/datapathy/query.rb', line 102 def method_missing(method_name, *args, &blk) condition = Condition.new(method_name, *args, &blk) @conditions << condition condition end |
Instance Method Details
permalink #inspect ⇒ Object
[View source]
108 109 110 |
# File 'lib/datapathy/query.rb', line 108 def inspect @conditions.inspect end |