Module: FizzBuzzer::V8
- Defined in:
- lib/fizzbuzzer.rb
Instance Method Summary collapse
Instance Method Details
#fizzbuzz ⇒ Object
237 238 239 240 241 242 243 244 245 246 |
# File 'lib/fizzbuzzer.rb', line 237 def fizzbuzz (1..100).map do |n| case [n % 3 == 0, n % 5 == 0] when [true, true] then "FizzBuzz" when [true, false] then "Fizz" when [false, true] then "Buzz" else n end end end |