“FizzBuzz” code test

Here is my simple answer to a typical test given during interviews

class FizzBuzz
 
  attr_reader :output
 
  def initialize(iterations = 100)
    @output = (1..iterations).map { |i| fizz_buzz_test(i) }
  end
 
  def fizz_buzz_test(iteration)
    case
    when iteration % 15 == 0
      'FizzBuzz'
    when iteration % 5 == 0
      'Buzz'
    when iteration % 3 == 0
      "Fizz"
    else
      iteration
    end
  end
 
  def print
    @output.join(', ')
  end
 
end