lib/fizzbuzz/engine.rb
# FIXME: It is Numeric type pollution .
It is Numeric type pollution .
It is Numeric type pollution .
def generate(range)
    raise ArgumentError.new("Invalid range") unless valid_range?(range)
    range.map {|number|
      if number.fizz?
        "Fizz"
      elsif number.buzz?
        "Buzz"
      elsif number.fizzbuzz?
        "Fizz Buzz"
      else
        number
      end
    }
  end
def generate ( range ) raise ArgumentError . new ( "Invalid range" ) unless valid_range? ( range ) range . map { | number | if number . fizz? "Fizz" elsif number . buzz? "Buzz" elsif number . fizzbuzz? "Fizz Buzz" else number end } end
FIXME: It is Numeric type pollution .
FIXME : It is Numeric type pollution .
range
<not_specific>