Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/fizz-buzz.rb

Instance Method Summary collapse

Instance Method Details

#buzz?Boolean

Returns:

  • (Boolean)


28
29
30
31
32
# File 'lib/fizz-buzz.rb', line 28

def buzz?
  if (self % 5) == 0
    return :true
  end
end

#fizz?Boolean

Returns:

  • (Boolean)


22
23
24
25
26
# File 'lib/fizz-buzz.rb', line 22

def fizz?
  if (self % 3) == 0
    return :true
  end
end

#fizzbuzz?Boolean

Returns:

  • (Boolean)


34
35
36
37
38
# File 'lib/fizz-buzz.rb', line 34

def fizzbuzz?
  if (self % 15) == 0
    return :true
  end
end