Sha256: 8eb9a3638e2878cea9db347d99f746bf8b4b18d680aaaefa47d12ca37f325f74

Contents?: true

Size: 107 Bytes

Versions: 13

Compression:

Stored size: 107 Bytes

Contents

class Hash
  def hash_revert
    r = Hash.new {|h,k| h[k] = []}
    each {|k,v| r[v] << k}
    r
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sugar-high-0.2.8 lib/sugar-high/hash.rb
sugar-high-0.2.7 lib/sugar-high/hash.rb
sugar-high-0.2.6 lib/sugar-high/hash.rb
sugar-high-0.2.5 lib/sugar-high/hash.rb
sugar-high-0.2.4 lib/sugar-high/hash.rb
sugar-high-0.2.2 lib/sugar-high/hash.rb
sugar-high-0.2.1 lib/sugar-high/hash.rb
sugar-high-0.2.0 lib/sugar-high/hash.rb
sugar-high-0.1.8 lib/sugar-high/hash.rb
sugar-high-0.1.7 lib/sugar-high/hash.rb
sugar-high-0.1.6 lib/sugar-high/hash.rb
sugar-high-0.1.5 lib/sugar-high/hash.rb
sugar-high-0.1.4 lib/sugar-high/hash.rb