Module: WordNumberComparaisons

Included in:
BigDecimal, Float, Integer
Defined in:
lib/code-ruby.rb

Instance Method Summary collapse

Instance Method Details

#eight?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/code-ruby.rb', line 54

def eight?
  self == 8
end

#five?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/code-ruby.rb', line 42

def five?
  self == 5
end

#four?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/code-ruby.rb', line 38

def four?
  self == 4
end

#nine?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/code-ruby.rb', line 58

def nine?
  self == 9
end

#one?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/code-ruby.rb', line 26

def one?
  self == 1
end

#seven?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/code-ruby.rb', line 50

def seven?
  self == 7
end

#six?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/code-ruby.rb', line 46

def six?
  self == 6
end

#ten?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/code-ruby.rb', line 62

def ten?
  self == 10
end

#three?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/code-ruby.rb', line 34

def three?
  self == 3
end

#two?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/code-ruby.rb', line 30

def two?
  self == 2
end

#zero?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/code-ruby.rb', line 22

def zero?
  zero?
end