Method: Code::Object::Integer#code_round

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

#code_round(n = nil) ⇒ Object



335
336
337
338
339
340
# File 'lib/code/object/integer.rb', line 335

def code_round(n = nil)
  code_n = n.to_code
  code_n = Integer.new(0) if code_n.nothing?

  Integer.new(raw.round(code_n.raw))
end