[Nitro] Concerns over Og mandating the form of initialize

James Britt james_b at neurogami.com
Thu Apr 14 10:31:44 EDT 2005

George Moschovitis wrote:
>>>og_read restores f.create_data so it is NOT nil.
>>Yes, currently, because og_read calls new.  But using allocate in place
>>of new will bypass the initialization of @tstamp
> no, no...
> after klass.allocate, og_read is called. og_read SETS the timestamp
> to the correct value! I have tested this. It works correctly.
> -g.

Where does og_read get this value?  It should hold the value of when the 
object created (i.e. when populated with database content).

Here's my Og version of the example

class Foo
   prop_accessor  :x, Integer
   prop_accessor  :y, Integer

   def initialize( x=nil, y=nil )
      @x = x || 0
      @y = y || 0
      @tstamp = Time.new

   def create_date


What value would create_date return after og_read?


More information about the Nitro-general mailing list