Ruby gem to make a bi-directional hash map. A bi-directional hash is a key, key pair hash, where the corresposnding key to a given key can be found in constant time.
gem install bhash
require 'bhash'Initializing empty BHash
hash = BHash.new()Initializing BHash with a Hash object
hash = BHash.new({"Dog=>"Cat","Horse"=>"Girrafe", 1=>2})Add single key, key pair
hash.add("Apple","Oranges")Add multiple key,key pairs
hash.add({"Dog=>"Cat","Horse"=>"Girrafe", 1=>2})hash.find("Alaska")Pass either of the key from key, key to be deleted
hash.delete("Golf")hash.present?("Mozart")hash.update_key(old_key,new_key)hash.update_value(given_key,new_corresponding_key)hash.print()