Class: Dee::Container::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/dee/container.rb

Direct Known Subclasses

SingletonFactory

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Factory

Returns a new instance of Factory.



4
5
6
# File 'lib/dee/container.rb', line 4

def initialize(&block)
  @block = block
end

Instance Method Details

#createObject



8
9
10
# File 'lib/dee/container.rb', line 8

def create
  @block.call
end