Class: Datapathy::Query::ConditionSet

Inherits:
ActiveSupport::BasicObject
Defined in:
lib/datapathy/query.rb

Instance Method Summary collapse

Constructor Details

#initializeConditionSet

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

#method_missing(method_name, *args, &blk) ⇒ Object



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

#inspectObject



108
109
110
# File 'lib/datapathy/query.rb', line 108

def inspect
  @conditions.inspect
end