class Dynamicloud::API::Criteria::NullCondition

This class represents an is null or is not null condition. @author Eleazar Gomez @version 1.0.0 @since 8/23/15

Public Class Methods

new(left, is_not_null = false) click to toggle source

Constructor tha builds this condition @param left attribute to compare @param is_not_null flag that indicates what kind of comparison.

# File lib/dynamic_criteria.rb, line 336
def initialize(left, is_not_null = false)
  @left = left
  @is_not_null = is_not_null
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 344
def to_record_string(parent)
  '"' + @left + '": {' + (@is_not_null ? '"$notNull"' : '"$null"') + ': "1"}';
end