Tiny library to check if an Integer or String is palindrome.
This was done as part of a short presentation at the Bogota Ruby Meetup about creating Ruby Gems, slides are here.
Add this line to your application's Gemfile:
gem 'palenque'
And then execute:
$ bundle
Or install it yourself as:
$ gem install palenque
Palenque.palindrome?('Radar') # => true
Palenque.palindrome?(45654) # => true
# It always returns false for any other type of object
Palenque.palindrome?([1, 2, 1]) # => false
Palenque.palindrome?(nil) # => false
- Fork it
- 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 new Pull Request
See LICENSE for details.