This small program can easily be turned into a gem, although I am not sure who would want to :)
This small addressbook includes a library for parsing a CSV file and shoving that into a hash (array of hashes) that it returns.
In the example file (runme.rb), I combine the 3 arrays from 3 files, create a person out of each row, and instantiate an addressbook. I never got around to adding add/remove methods to the addressbook as I never needed them. The current implementation is simple enough. The addressbook keeps a last_sorted variable that it uses to print itself with. There are lots of little things here and there that could be done to spruce it up, but this is simple and easy to understand.
I have tested it with MiniTest. To run the tests type 'rake test' to run the example file, cd into the example directory and then run ruby runme.rb
You will need Ruby 1.9.2 and rake 0.9.2.2
Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
Fork the project.
Start a feature/bugfix branch.
Commit and push until you are happy with your contribution.
Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright © 2012 tesmar. See LICENSE.txt for further details.