# * George Moschovitis # (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