shoden-contrib adds some sugar to play with Shoden
Installation
gem install shoden-contrib
Data Types
class Person < Shoden::Model
include Shoden::DataTypes
attribute :age, Type::Integer
end
Default
class Person < Shoden::Model
include Shoden::Default
attribute :name
default :name, 'John Doe'
end
Timestamps
class Person < Shoden::Model
include Shoden::Timestamps
end
person = Person.create
person.created_at
person.updated_at