Sha256: 8fe3f34a9d0566c1e8763f362505dd38eebdd46bd9cc8ab6ce1314c6507612bc
Contents?: true
Size: 897 Bytes
Versions: 3
Compression:
Stored size: 897 Bytes
Contents
# * George Moschovitis <gm@navel.gr> # (c) 2004 Navel, all rights reserved. # $Id: content.rb 297 2005-03-10 14:23:00Z gmosx $ require 'nitro/markup' module 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 N::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 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.13.0 | examples/no_xsl_blog/lib/content.rb |
nitro-0.14.0 | examples/no_xsl_blog/lib/content.rb |
nitro-0.15.0 | examples/no_xsl_blog/lib/content.rb |