Method: Sohm::Model#hash
- Defined in:
- lib/sohm.rb
#hash ⇒ Object
Return a value that allows the use of models as hash keys.
Example:
h = {}
u = User.new
h[:u] = u
h[:u] == u
# => true
997 998 999 |
# File 'lib/sohm.rb', line 997 def hash new? ? super : key.hash end |