Method: Code::Object::Decimal#code_plus

Defined in:
lib/code/object/decimal.rb

#code_plus(other) ⇒ Object



227
228
229
230
231
232
233
# File 'lib/code/object/decimal.rb', line 227

def code_plus(other)
  if other.is_a?(Number)
    Decimal.new(raw + other.raw)
  else
    String.new(to_s + other.to_s)
  end
end