A gem that contains the logic for a FizzBuzz program, you give it a maximum value and from 1 to max it wil return:
Fizz if the number is diviable by 3
Buzz if it is divisable by 5
FizzBuzz if it is divisable by 15
or the number if none of those are true
It also can reutrn the resualt in 3 different formats:
json
html
plain text
For example useage see: examples/example_usage.rb
Add this line to your application's Gemfile:
gem 'fizzbuzz_aj'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fizzbuzz_aj
FizzBuzz_aj performs the FizzBuzz calculations and format_aj formats the output
- Fork it ( https://github.com/[my-github-username]/fizzbuzz_aj/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request