Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/MusicMaster/Hash.rb
Instance Method Summary collapse
-
#unique_id ⇒ Object
Get a unique ID that will always be the same for any Hash having the same content.
Instance Method Details
#unique_id ⇒ Object
Get a unique ID that will always be the same for any Hash having the same content
- Return
-
String: The unique ID
12 13 14 |
# File 'lib/MusicMaster/Hash.rb', line 12 def unique_id return Digest::MD5.hexdigest(self.to_a.sort.to_yaml) end |