Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
README.textile
Rakefile
with_reverse_lookup.gemspec

README.textile

With Reverse Lookup

Extends a hash to be able to look up keys by value (for bi-directional hashes).

Sample

table = {
  :foo => "Foo",
  :bar => "Bar",
  :baz => "Baz"
}.extend(WithReverseLookup)

table[:foo]   #=> "Foo"
table["Foo"]  #=> :foo

License

MIT

Copyright

Copyright © 2010 Matt Todd.

Something went wrong with that request. Please try again.