Module: WordNumberComparaisons

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

Instance Method Summary collapse

Instance Method Details

#eight?Boolean

Returns:

  • (Boolean)


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

def eight?
  self == 8
end

#five?Boolean

Returns:

  • (Boolean)


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

def five?
  self == 5
end

#four?Boolean

Returns:

  • (Boolean)


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

def four?
  self == 4
end

#nine?Boolean

Returns:

  • (Boolean)


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

def nine?
  self == 9
end

#one?Boolean

Returns:

  • (Boolean)


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

def one?
  self == 1
end

#seven?Boolean

Returns:

  • (Boolean)


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

def seven?
  self == 7
end

#six?Boolean

Returns:

  • (Boolean)


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

def six?
  self == 6
end

#ten?Boolean

Returns:

  • (Boolean)


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

def ten?
  self == 10
end

#three?Boolean

Returns:

  • (Boolean)


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

def three?
  self == 3
end

#two?Boolean

Returns:

  • (Boolean)


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

def two?
  self == 2
end

#zero?Boolean

Returns:

  • (Boolean)


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

def zero?
  zero?
end