Class: FizzBuzzCheck
- Inherits:
-
Object
- Object
- FizzBuzzCheck
- Defined in:
- lib/fizzbuzz.rb
Overview
require_relative ‘./error_handle’
Class Method Summary collapse
Class Method Details
.check_fizzbuzz(n) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/fizzbuzz.rb', line 4 def self.check_fizzbuzz(n) if n % 15 == 0 "#{n} FizzBuzz" elsif n % 3 == 0 "#{n} Fizz" elsif n % 5 == 0 "#{n} Buzz" end end |