No commit activity in last 3 years
No release in over 3 years
robot_enumerable is a collection useful additions to the Array and Hash classes like #dupes?, #dupes_by, #uniq_by, #bump_to_front, and others.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

robot_enumerable¶ ↑

robot_enumerable is a collection of useful additions to the Array and Hash classes.

What does this mean? It means that you can accomplish more with less code. It means that the code you write is clearer and cleaner. It’s very ruby.

["a", "b", "c", "a"].dupes?
# => true

["Sarah", "SARAH", "sarah"].uniq_by { |x| x.downcase }
# => ["Sarah"]

select_options = [[:ca, "Canada"], [:usa, "United States"], [:mex, "Mexico"]]
select_options.bump_to_front { |abbr, label| abbr == :usa }
# => [[:usa, "United States"], [:ca, "Canada"], [:mex, "Mexico"]]

Note on Patches/Pull Requests¶ ↑

  • Fork the project on github

  • Make your feature addition or bug fix.

  • Add tests for it if you really want to be a pal.

  • Commit, please do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. If I include it, I’ll add you to the list of contributors in this readme file.

Copyright © 2010 Mike Judge (mikelovesrobots). See LICENSE for details.