Method: Sohm::Model#id

Defined in:
lib/sohm.rb

#idObject

Access the ID used to store this model. The ID is used together with the name of the class in order to form the Redis key.

Different from ohm, id must be provided by the user in sohm, if you want to use auto-generated id, you can include Sohm::AutoId module.

Raises:



929
930
931
932
# File 'lib/sohm.rb', line 929

def id
  raise MissingID if not defined?(@id)
  @id
end