module ActiveModel::Attributes
def attributes
person.age = 22
person.name = "Francesco"
person = Person.new
end
attribute :age, :integer
attribute :name, :string
include ActiveModel::Attributes
class Person
values of the attributes as values.
Returns a hash of all the attributes with their names as keys and the
def attributes @attributes.to_hash end