Module: Enumerable

Defined in:
lib/buzzfizz/enumerable.rb

Instance Method Summary collapse

Instance Method Details

#fizzbuzzObject



8
9
10
11
12
# File 'lib/buzzfizz/enumerable.rb', line 8

def fizzbuzz
  fizzbuzz_array.each { |f| puts f }

  nil
end

#fizzbuzz_arrayObject



2
3
4
5
6
# File 'lib/buzzfizz/enumerable.rb', line 2

def fizzbuzz_array
  map do |i|
    i.fizzbuzz if i.respond_to? :fizzbuzz
  end
end