Class: Integer

Inherits:
Numeric show all
Includes:
Integral
Defined in:
mrblib/numeric.rb,
src/numeric.c

Overview

15.2.8

Direct Known Subclasses

Fixnum

Instance Method Summary (collapse)

Methods included from Integral

#downto, #next, #step, #times, #upto

Methods inherited from Numeric

#+@, #-@, #abs, #quo

Methods included from Comparable

#<, #<=, #==, #>, #>=, #between?

Instance Method Details

- (Object) ceil

Returns the receiver simply.

ISO 15.2.8.3.14



133
134
135
# File 'mrblib/numeric.rb', line 133

def ceil
  self
end

- (Object) floor Also known as: round, truncate

Returns the receiver simply.

ISO 15.2.8.3.17



141
142
143
# File 'mrblib/numeric.rb', line 141

def floor
  self
end

- (Integer) to_i - (Integer) to_int

As int is already an Integer, all these methods simply return the receiver.

Overloads:



538
539
540
541
542
# File 'src/numeric.c', line 538

static mrb_value
int_to_i(mrb_state *mrb, mrb_value num)
{
  return num;
}

- (Integer) to_i - (Integer) to_int

As int is already an Integer, all these methods simply return the receiver.

Overloads:



538
539
540
541
542
# File 'src/numeric.c', line 538

static mrb_value
int_to_i(mrb_state *mrb, mrb_value num)
{
  return num;
}