Module: WordNumberComparaisons

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

Instance Method Summary collapse

Instance Method Details

#eight?Boolean

Returns:

  • (Boolean)


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

def eight?
  self == 8
end

#five?Boolean

Returns:

  • (Boolean)


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

def five?
  self == 5
end

#four?Boolean

Returns:

  • (Boolean)


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

def four?
  self == 4
end

#nine?Boolean

Returns:

  • (Boolean)


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

def nine?
  self == 9
end

#one?Boolean

Returns:

  • (Boolean)


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

def one?
  self == 1
end

#seven?Boolean

Returns:

  • (Boolean)


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

def seven?
  self == 7
end

#six?Boolean

Returns:

  • (Boolean)


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

def six?
  self == 6
end

#ten?Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/code-ruby.rb', line 65

def ten?
  self == 10
end

#three?Boolean

Returns:

  • (Boolean)


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

def three?
  self == 3
end

#two?Boolean

Returns:

  • (Boolean)


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

def two?
  self == 2
end

#zero?Boolean

Returns:

  • (Boolean)


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

def zero?
  zero?
end