Module: WordNumberComparaisons

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

Instance Method Summary collapse

Instance Method Details

#eight?Boolean

Returns:

  • (Boolean)


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

def eight?
  self == 8
end

#five?Boolean

Returns:

  • (Boolean)


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

def five?
  self == 5
end

#four?Boolean

Returns:

  • (Boolean)


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

def four?
  self == 4
end

#nine?Boolean

Returns:

  • (Boolean)


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

def nine?
  self == 9
end

#one?Boolean

Returns:

  • (Boolean)


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

def one?
  self == 1
end

#seven?Boolean

Returns:

  • (Boolean)


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

def seven?
  self == 7
end

#six?Boolean

Returns:

  • (Boolean)


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

def six?
  self == 6
end

#ten?Boolean

Returns:

  • (Boolean)


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

def ten?
  self == 10
end

#three?Boolean

Returns:

  • (Boolean)


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

def three?
  self == 3
end

#two?Boolean

Returns:

  • (Boolean)


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

def two?
  self == 2
end

#zero?Boolean

Returns:

  • (Boolean)


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

def zero?
  zero?
end