Class: Dynamicloud::API::Criteria::BetweenCondition
- Defined in:
- lib/dynamic_criteria.rb
Overview
End of EqualCondition class
Constant Summary
Constants inherited from Condition
Condition::ROOT, Condition::WITHOUT
Instance Method Summary collapse
-
#initialize(field, left, right) ⇒ BetweenCondition
constructor
Builds an instance with a specific field whose value should be between left and right.
-
#to_record_string(parent) ⇒ Object
This method will return a String of this condition.
Constructor Details
#initialize(field, left, right) ⇒ BetweenCondition
Builds an instance with a specific field whose value should be between left and right
136 137 138 139 140 |
# File 'lib/dynamic_criteria.rb', line 136 def initialize(field, left, right) @field = field @left = left @right = right end |
Instance Method Details
#to_record_string(parent) ⇒ Object
This method will return a String of this condition
145 146 147 |
# File 'lib/dynamic_criteria.rb', line 145 def to_record_string(parent) "\"" + @field + "\": { \"$between\": [" + (transform_left_right) + ']}' end |