Method: Sohm::Model#attributes

Defined in:
lib/sohm.rb

#attributesObject

Returns a hash of the attributes with their names as keys and the values of the attributes as values. It doesn’t include the ID of the model.

Example:

class User < Sohm::Model
  attribute :name
end

u = User.create(:name => "John")
u.attributes
# => { :name => "John" }


1016
1017
1018
# File 'lib/sohm.rb', line 1016

def attributes
  @attributes
end