Class: Dynamicloud::API::Criteria::NotEqualCondition
- Defined in:
- lib/dynamic_criteria.rb
Overview
This class represents a not equal condition left != ‘%som%thing%’
Constant Summary
Constants inherited from Condition
Condition::ROOT, Condition::WITHOUT
Instance Method Summary collapse
-
#initialize(left, right) ⇒ NotEqualCondition
constructor
Constructor tha builds this condition.
-
#to_record_string(parent) ⇒ Object
This method will return a String of this condition.
Constructor Details
#initialize(left, right) ⇒ NotEqualCondition
Constructor tha builds this condition
313 314 315 316 |
# File 'lib/dynamic_criteria.rb', line 313 def initialize(left, right) @left = left @right = right end |
Instance Method Details
#to_record_string(parent) ⇒ Object
This method will return a String of this condition
321 322 323 |
# File 'lib/dynamic_criteria.rb', line 321 def to_record_string(parent) '"$ne" : {"' + @left + '" : ' + (@right.is_a?(String) ? '"' : '') + (@right.to_s) + (@right.is_a?(String) ? '"' : '') + '}' end |