module ActiveModel::Attributes

def attributes

person.attributes # => { "name" => "Francesco", "age" => 22}

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