Class: Object

Inherits:
BasicObject
Defined in:
lib/ostructer.rb

Overview

extensions to core/built-in classes (Object, Array, Hash)

Instance Method Summary collapse

Instance Method Details

#to_openstruct(logger) ⇒ Object



321
322
323
324
325
326
327
328
329
330
331
# File 'lib/ostructer.rb', line 321

def to_openstruct( logger )
  
  # pass 1: construct data structure using new classes (OsArray, OsOpenStruct, OsValue) 
  # convert Array  to OsArray
  # convert Hash   to OsOpenStruct
  # convert String to OsValue
      
  newself = self.to_openstruct_pass1( logger )    
  newself.to_openstruct_pass2         # pass 2: link up parents (reverse link)
  newself
end