class Dynamicloud::API::Criteria::ANDCondition
End of JoinClause
class
Public Class Methods
new(left, right)
click to toggle source
Will build an and condition using two part. @param left left part of this and condition @param right right part of this and condition
# File lib/dynamic_criteria.rb, line 85 def initialize(left, right) unless (left.is_a?(Condition)) || (right.is_a?(Condition)) raise 'left and right should implement Condition' end @left = left @right = right end
Public Instance Methods
to_record_string(parent)
click to toggle source
This method will return a String of this condition @param parent this is the parent of this condition @return a json
# File lib/dynamic_criteria.rb, line 97 def to_record_string(parent) (parent.is_a?(ORCondition) ? '"where": {' : '') + @left.to_record_string(self) + ',' + @right.to_record_string(self) + (parent.is_a?(ORCondition) ? '}' : '') end