Class: Integer
- Includes:
- Integral
- Defined in:
- mrblib/numeric.rb,
src/numeric.c
Overview
Integer
ISO 15.2.8
Direct Known Subclasses
Instance Method Summary collapse
-
#ceil ⇒ Object
Returns the receiver simply.
-
#floor ⇒ Object
(also: #round, #truncate)
Returns the receiver simply.
-
#to_i ⇒ Object
As int is already an
Integer, all these methods simply return the receiver. -
#to_int ⇒ Object
As int is already an
Integer, all these methods simply return the receiver.
Methods included from Integral
#div, #downto, #negative?, #next, #nonzero?, #positive?, #step, #times, #upto, #zero?
Methods inherited from Numeric
#**, #+@, #-@, #/, #<, #<=, #<=>, #>, #>=, #abs, #finite?, #infinite?, #quo
Methods included from Comparable
#<, #<=, #==, #>, #>=, #between?, #clamp
Instance Method Details
#ceil ⇒ Object
Returns the receiver simply.
ISO 15.2.8.3.14
712 713 714 715 716 |
# File 'src/numeric.c', line 712 static mrb_value int_to_i(mrb_state *mrb, mrb_value num) { return num; } |
#floor ⇒ Object Also known as: round, truncate
Returns the receiver simply.
ISO 15.2.8.3.17
712 713 714 715 716 |
# File 'src/numeric.c', line 712 static mrb_value int_to_i(mrb_state *mrb, mrb_value num) { return num; } |