class DrgDSL::Ast::Comparison
A comparison is either from a table_condition
, a condition or a date_expression
Attributes
op[R]
table_condition[R]
value[R]
Public Class Methods
new(op:, value:, table_condition: nil)
click to toggle source
# File lib/drgdsl/ast.rb, line 246 def initialize(op:, value:, table_condition: nil) @op = op.to_s.strip @value = value @table_condition = table_condition end
Public Instance Methods
hash()
click to toggle source
# File lib/drgdsl/ast.rb, line 262 def hash @hash ||= [type, op, value, table_condition].hash end
to_hash()
click to toggle source
# File lib/drgdsl/ast.rb, line 252 def to_hash { comparison: { op: op, value: value.to_hash, table_condition: table_condition&.to_hash } } end