Class: Integer

Inherits:
Numeric show all
Defined in:
lib/laser/standard_library/integer.rb

Direct Known Subclasses

Bignum, Fixnum

Instance Method Summary (collapse)

Methods inherited from Numeric

#%, #+@, #-@, #<=>, #abs, #abs2, #angle, #arg, #coerce, #conj, #conjugate, #div, #divmod, #eql?, #fdiv, #i, #imag, #imaginary, #magnitude, #modulo, #nonzero?, #phase, #polar, #pretty_print, #pretty_print_cycle, #quo, #real, #real?, #rect, #rectangular, #remainder, #singleton_method_added, #step, #to_c, #zero?

Methods included from Comparable

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

Instance Method Details

- (Object) ceil

builtin: true pure: true raise: false



5
6
# File 'lib/laser/standard_library/integer.rb', line 5

def ceil
end

- (Object) chr

builtin: true pure: true raise: false



10
11
# File 'lib/laser/standard_library/integer.rb', line 10

def chr
end

- (Object) denominator

builtin: true pure: true raise: false



15
16
# File 'lib/laser/standard_library/integer.rb', line 15

def denominator
end

- (Object) downto(int)

builtin: true pure: true yield_usage: optional



20
21
# File 'lib/laser/standard_library/integer.rb', line 20

def downto(int)
end

- (Boolean) even?

builtin: true pure: true raise: false

Returns:

  • (Boolean)


25
26
# File 'lib/laser/standard_library/integer.rb', line 25

def even?
end

- (Object) floor

builtin: true pure: true raise: false



30
31
# File 'lib/laser/standard_library/integer.rb', line 30

def floor
end

- (Object) gcd(int)

builtin: true pure: true



34
35
# File 'lib/laser/standard_library/integer.rb', line 34

def gcd(int)
end

- (Object) gcdlcm(int)

builtin: true pure: true



38
39
# File 'lib/laser/standard_library/integer.rb', line 38

def gcdlcm(int)
end

- (Boolean) integer?

builtin: true pure: true raise: false

Returns:

  • (Boolean)


43
44
# File 'lib/laser/standard_library/integer.rb', line 43

def integer?
end

- (Object) lcm(int)

builtin: true pure: true



47
48
# File 'lib/laser/standard_library/integer.rb', line 47

def lcm(int)
end

- (Object) next

builtin: true pure: true raise: false



52
53
# File 'lib/laser/standard_library/integer.rb', line 52

def next
end

- (Object) numerator

builtin: true pure: true raise: false



57
58
# File 'lib/laser/standard_library/integer.rb', line 57

def numerator
end

- (Boolean) odd?

builtin: true pure: true raise: false

Returns:

  • (Boolean)


62
63
# File 'lib/laser/standard_library/integer.rb', line 62

def odd?
end

- (Object) ord

builtin: true pure: true raise: false



67
68
# File 'lib/laser/standard_library/integer.rb', line 67

def ord
end

- (Object) pred

builtin: true pure: true raise: false



72
73
# File 'lib/laser/standard_library/integer.rb', line 72

def pred
end

- (Object) rationalize

builtin: true pure: true raise: false



77
78
# File 'lib/laser/standard_library/integer.rb', line 77

def rationalize
end

- (Object) round(digits = 0)

builtin: true pure: true



81
82
# File 'lib/laser/standard_library/integer.rb', line 81

def round(digits=0)
end

- (Object) succ

builtin: true pure: true raise: false



86
87
# File 'lib/laser/standard_library/integer.rb', line 86

def succ
end

- (Object) times

builtin: true pure: true raise: false yield_usage: optional



92
93
# File 'lib/laser/standard_library/integer.rb', line 92

def times
end

- (Object) to_i

builtin: true pure: true raise: false



97
98
# File 'lib/laser/standard_library/integer.rb', line 97

def to_i
end

- (Object) to_int

builtin: true pure: true raise: false



102
103
# File 'lib/laser/standard_library/integer.rb', line 102

def to_int
end

- (Object) to_r

builtin: true pure: true raise: false



107
108
# File 'lib/laser/standard_library/integer.rb', line 107

def to_r
end

- (Object) truncate

builtin: true pure: true raise: false



112
113
# File 'lib/laser/standard_library/integer.rb', line 112

def truncate
end

- (Object) upto(max)

builtin: true pure: true raise: false yield_usage: optional



118
119
# File 'lib/laser/standard_library/integer.rb', line 118

def upto(max)
end