Sha256: ead1a2c42b417abaa30ff0ff903173853f0488fa90e94de5ebc4f1ea5f62220d
Contents?: true
Size: 893 Bytes
Versions: 3
Compression:
Stored size: 893 Bytes
Contents
# * George Moschovitis <gm@navel.gr> # (c) 2004-2005 Navel, all rights reserved. # $Id: content.rb 313 2005-03-16 19:18:09Z gmosx $ require 'nitro/markup' include N # The foundamental Content Unit. module BaseContent include Markup prop_accessor :title, String prop_accessor :body, String, :markup => true, :ui => :textarea end # CreateTime mixin. module CreateTime prop_accessor :create_time, Time prop_accessor :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 prop_accessor :name, String prop_accessor :ctime, Time prop_accessor :mtime, Time def initialize(*args) @ctime = @mtime = Time.now end end # A Category. class Category include BaseContent end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.13.0 | examples/blog/src/models/content.rb |
nitro-0.14.0 | examples/blog/src/models/content.rb |
nitro-0.15.0 | examples/blog/src/models/content.rb |