Method: Lapillus::Container#initialize

Defined in:
lib/lapillus/base.rb

#initialize(id, options = {}) ⇒ Container

Returns a new instance of Container.



190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/lapillus/base.rb', line 190

def initialize(id, options={})
  super(id, options)
  @components = []
  classes_to_process.each {|clazz| 
    clazz.stored_components.each {|stored_component|
      #TODO model symbol stuff
      new_component = stored_component.block.call
      new_component.parent = self #NOTE: I could do this in the constructor!
      components << new_component
    }
  }
end