Sha256: bd51be313fecec4cb814059fba93960dfd155a26eec64be015454a31d46dfa6e
Contents?: true
Size: 721 Bytes
Versions: 1
Compression:
Stored size: 721 Bytes
Contents
require 'nitro/markup' # The foundamental Content Unit. module BaseContent include Nitro::Markup property :title, String property :body, String, :markup => true, :ui => :textarea end # CreateTime mixin. module CreateTime property :create_time, Time property :update_time, Time def og_pre_insert(conn) @create_time = @update_time = Time.now end def og_pre_update(conn) @update_time = Time.now end end # The foundamental Content Unit. #-- # THINK: rename this to Entity? #++ module Content include BaseContent property :name, String property :ctime, Time property :mtime, Time def initialize(*args) @ctime = @mtime = Time.now end end # A Category. class Category include BaseContent end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.17.0 | examples/no_xsl_blog/lib/content.rb |