Refactor fizzbuzz.rb into method