simple_find
It is shortcut for Rails so if we want to have array finder which raise not found error, simply just use find! (with bang)
Installation
Add this line to your application's Gemfile:
gem 'simple_find'
And then execute:
$ bundle
Or install it yourself as:
$ gem install simple_find
Usage
names = ['Adit', 'Mpit', 'Hujan']
names.find! { |n| n.eql?('Adit') }
Development
Contributing
- Fork it ( https://github.com/aditiamahdar/simple_find/fork )
- Create your feature branch (
git checkout -b new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin new-feature
) - Create a new Pull Request
This project rocks and uses MIT-LICENSE.