Module: FizzBuzzer::V2a
- Defined in:
- lib/fizzbuzzer.rb
Overview
module V1
Instance Method Summary collapse
Instance Method Details
#fizzbuzz ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/fizzbuzzer.rb', line 28 def fizzbuzz (1..100).map do |n| if n % 3 == 0 && n % 5 == 0 "FizzBuzz" elsif n % 3 == 0 "Fizz" elsif n % 5 == 0 "Buzz" else n end end end |