This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FizzBuzzGame | |
class Number | |
def initialize(number) | |
@value= number | |
end | |
def answer_for | |
return FIZZBUZZ if divisible_by?(3) and divisible_by?(5) | |
return FIZZ if divisible_by?(3) | |
return BUZZ if divisible_by?(5) |