module FizzBuzzer::V2b
Public Instance Methods
fizzbuzz()
click to toggle source
# File lib/fizzbuzzer.rb, line 44 def fizzbuzz (1..100).map do |n| if (n % 15).zero? then "FizzBuzz" elsif (n % 3).zero? then "Fizz" elsif (n % 5).zero? then "Buzz" else n end end end