Class: Yequel::Model::Hash

Inherits:
Hash
  • Object
show all
Includes:
ObjectSpace
Defined in:
lib/yequel.rb

Overview

class Array < Array end

Instance Method Summary collapse

Instance Method Details

#saveObject



203
204
205
206
207
208
209
210
211
212
213
# File 'lib/yequel.rb', line 203

def save
  p self
  p self[:mod_name]
  p 'saving ...'
  object = nil
  ObjectSpace.each_object(Model) {|obj| object=obj if object.nil? and obj.name==self[:mod_name]}
  p object
  p object.name
  p '++++++++'
  object.update(self)
end