Class: FizzBuzz

Inherits:
Object
  • Object
show all
Defined in:
lib/main.rb

Class Method Summary collapse

Class Method Details

.fizzbuzz(*args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/main.rb', line 5

def self.fizzbuzz(*args)
  start = args[0]
  stop = args[1]
  check = ErrorHandle.error_check(*args)
  if check
    (start..stop).each do |i|
      puts " #{FizzBuzzCheck.check_fizzbuzz(i)}" unless FizzBuzzCheck.check_fizzbuzz(i).nil?
    end
  end
end