Method: Code::Object::Integer#code_power

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

#code_power(other) ⇒ Object



307
308
309
310
311
312
313
# File 'lib/code/object/integer.rb', line 307

def code_power(other)
  if other.is_a?(Integer)
    Integer.new(raw**other.raw)
  else
    Decimal.new(raw**other.raw)
  end
end