Class: Gloo::Expr::OpPlus
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.
14 15 16 17 18 19 20 |
# File 'lib/gloo/expr/op_plus.rb', line 14 def perform( left, right ) 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 end |