Class: Gloo::Expr::OpEq
Constant Summary collapse
- SYMBOL =
'='.freeze
- ALT_SYMBOL =
'=='.freeze
Instance Method Summary collapse
-
#perform(left, right) ⇒ Object
Perform the operation and return the result.
Methods inherited from Core::Op
Instance Method Details
#perform(left, right) ⇒ Object
Perform the operation and return the result.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gloo/expr/op_eq.rb', line 17 def perform( left, right ) cmp = DtTools.compare_dt( left, right ) return cmp == 0 unless cmp == :not_dt return left == right.to_s if left.is_a? String return left == right.to_i if left.is_a? Integer return left == right.to_f if left.is_a? Numeric if Gloo::Objs::Boolean.boolean?( left ) && Gloo::Objs::Boolean.boolean?( right ) return left == right end return false end |