| Dependency Injection: Vital or Irrelevant? | [ Prev | Home | Next ] |
def service_block(name)
@services[name] || @parent.service_block(name)
end
And this …
def initialize(parent=nil)
@services = {}
@cache = {}
@parent = parent || Container
end
| O'REILLY® OSCON 2005 | Copyright © 2005 by Jim Weirich (Some Rights Reserved) |