[Nitro] Concerns over Og mandating the form of initialize

James Britt james_b at neurogami.com
Tue Apr 12 09:54:49 EDT 2005

George Moschovitis wrote:
> Hmm, I am not sure, how to integrate this code snippet in Og. 
> Can you please explain this a little bit better? I 'll also try to
> think on this later today (very difficult to work on nitro/think in
> the office).

In the assorted Og adapters, when read_all is called, the code 
instantiates an instance of the serialized object, the calls obj.og_read 
(which sets object properties)

  res.each do |row|
   obj = klass.new
   objects << obj

Perhaps this could be replaced with something that first tries to 
populate the object by passing a block to klass.new.


More information about the Nitro-general mailing list