Method: Code::Object::Integer#code_multiplication

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

#code_multiplication(other) ⇒ Object



275
276
277
278
279
280
281
282
283
# File 'lib/code/object/integer.rb', line 275

def code_multiplication(other)
  if other.is_a?(Integer)
    Integer.new(raw * other.raw)
  elsif other.is_a?(Decimal)
    Decimal.new(raw * other.raw)
  else
    String.new(other.raw * raw)
  end
end