Sha256: b2db7dae36445a26795a619b2069b8bf1427314b5c8c047192643b33150e9e1c
Contents?: true
Size: 251 Bytes
Versions: 4
Compression:
Stored size: 251 Bytes
Contents
# Method to switch keys and values of an ordered hash. # origin: RM ActiveSupport::OrderedHash.class_eval do def invert inject(ActiveSupport::OrderedHash.new) do |res, pair| res[pair[1]] = pair[0] res end end end
Version data entries
4 entries across 4 versions & 1 rubygems