class Fixnum

monkey patch for Fixnum - note: use refinements (in the future) - why? why not?

Public Instance Methods

to_fizzbuzz() click to toggle source
# File lib/fizzbuzzer.rb, line 83
def to_fizzbuzz
  if self % 3 == 0 && self % 5 == 0
    "FizzBuzz"
  elsif self % 3 == 0
    "Fizz"
  elsif self % 5 == 0
    "Buzz"
  else
    self
  end
end