HelloWorldFizzBuzz
Is a commandline app to show examples of hello world & fizzbuzz in different programming languages.
Installation
Add this line to your application's Gemfile:
gem 'HelloWorldFizzBuzz'
And then execute:
$ bundle
Or install it yourself as:
$ gem install HelloWorldFizzBuzz
Usage
Type:
HelloWorldFizzBuzz -w language
To show the language's hello world example
Type:
HelloWorldFizzBuzz -b language
To show the language's fizz buzz example
Type:
HelloWorldFizzBuzz -l
To show the License of this project
Development
After checking out the repo, run bundle install to install dependencies. Then, run rake test to run the tests.
To install this gem onto your local machine, run bundle exec rake install.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/rangeroob/HelloWorldFizzBuzz. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create new Pull Request
The easiest way to contribute to this project is to add programing language examples of
hello world & fizzbuzz in the /HelloWorldFizzBuzz/lib/sqlite.rb file
example:
@posts.insert(language: 'ruby',
helloworld: "puts 'Hello, world!'",
fizzbuzz: "
def fizzbuzz(n)
(1..n).each do |i|
if i % 3 == 0 && i % 5 == 0
puts 'fizzbuzz'
elsif i % 3 == 0
puts 'fizz'
elsif i % 5 == 0
puts 'buzz'
else
puts i
end
end
end
fizzbuzz(100)")
License
The gem is available as open source under the terms of the GPL-3.0 or later.