Class: Datapathy::Query::Condition
- Inherits:
- ActiveSupport::BasicObject
- Defined in:
- lib/datapathy/query.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#block ⇒ Object
Returns the value of attribute block.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#then ⇒ Object
readonly
Returns the value of attribute then.
Instance Method Summary collapse
-
#initialize(operation, *arguments, &block) ⇒ Condition
constructor
A new instance of Condition.
- #inspect ⇒ Object
- #method_missing(method_name, *args, &blk) ⇒ Object
- #respond_to?(arg) ⇒ Boolean
Constructor Details
#initialize(operation, *arguments, &block) ⇒ Condition
Returns a new instance of Condition.
118 119 120 121 122 |
# File 'lib/datapathy/query.rb', line 118 def initialize(operation, *arguments, &block) @operation = operation @arguments = arguments unless arguments.empty? @block = block if block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
116 117 118 |
# File 'lib/datapathy/query.rb', line 116 def arguments @arguments end |
#block ⇒ Object
Returns the value of attribute block.
116 117 118 |
# File 'lib/datapathy/query.rb', line 116 def block @block end |
#operation ⇒ Object
Returns the value of attribute operation.
116 117 118 |
# File 'lib/datapathy/query.rb', line 116 def operation @operation end |
#then ⇒ Object (readonly)
Returns the value of attribute then.
115 116 117 |
# File 'lib/datapathy/query.rb', line 115 def then @then end |
Instance Method Details
#inspect ⇒ Object
132 133 134 135 136 137 |
# File 'lib/datapathy/query.rb', line 132 def inspect string = operation.to_s string << "#{@arguments.inspect}" unless @arguments.nil? string << " #{@then.inspect}" if @then string end |
#respond_to?(arg) ⇒ Boolean
128 129 130 |
# File 'lib/datapathy/query.rb', line 128 def respond_to?(arg) false end |