module FizzBuzzer::V2c

Public Instance Methods

fizzbuzz() click to toggle source
# File lib/fizzbuzzer.rb, line 56
def fizzbuzz
  (1..100).map do |n|
    case
    when n % 3 == 0 && n % 5 == 0 then "FizzBuzz"
    when n % 3 == 0 then "Fizz"
    when n % 5 == 0 then "Buzz"
    else n
    end
  end
end