class Hash
Public Instance Methods
hash()
click to toggle source
# File lib/simms_structures/hashing.rb, line 24 def hash hashed_array = [] each do |key, val| hashed_array << key.hash * val.hash end # we need to sort the hashed_array to ensure that the same hash is # generated from two hashes with different order of elements hashed_array.sort.hash end