Method: Needle::Container#initialize
- Defined in:
- lib/needle/container.rb
#initialize(parent = nil, name = nil) ⇒ Container
Create a new empty container with the given parent and name. If a parent is given, this container will inherit the defaults of the parent at the time the container was created.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/needle/container.rb', line 48 def initialize( parent=nil, name=nil ) @root = nil @builder = nil @name = name @parent = parent @service_points = Hash.new @defaults = ( parent.nil? ? Hash.new : parent.defaults.dup ) end |