Module: HashExtend::InstanceMethods
- Defined in:
- lib/hash_extend.rb
Instance Method Summary collapse
Instance Method Details
#hash_reverse ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/hash_extend.rb', line 8 def hash_reverse hash_new = {} self.each {|key,value| if not hash_new.has_key?(key) then hash_new[value] = key end } return hash_new end |