|
prev
-
up
-
next
-
index
-
Integer
-
The abstract class for integers, which has two subclasses
Fixnum and
Bignum . In Ruby,
both kinds of integers are mixable, and converted
automatically according to the value. Integers can be
treated as infinite bit strings for bit operations.
-
SuperClass:
-
-
Numeric
-
Included Modules:
-
-
Precision
-
Class Methods:
-
-
induced_from(num)
-
Converts num into Integer .
-
Methods:
-
-
self[nth]
-
Returns 1 if nth bit of the integer set, otherwise 0.
-
chr
-
Returns the string contains a character represented by that number in
the character set. For example, 65.chr returns the
string "A" .
The number must be within 0 to 255.
-
downto(min) {...}
-
Iterates from self to min, decrementing by 1.
-
integer?
-
Returns true.
-
size
-
Returns the approximate size of the integer in byte.
-
step(max, step) {...}
-
Iterates from self to max, adding
step each time.
-
succ
-
Returns the ``next'' value of the integer.
-
times {...}
-
Iterates self times. Self may be
rounded into integer.
-
to_i
-
Returns the receiver, since Integers do not need any conversion.
-
upto(max) {...}
-
Iterates from self to max, incrementing by 1.
prev
-
up
-
next
-
index
matz@netlab.co.jp
|