Class: Payload::FactoryResolver Private

Inherits:
Object
  • Object
show all
Defined in:
lib/payload/factory_resolver.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Encapsulates logic for resolving factory definitions.

Used internally by Container. Use Container#factory.

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ FactoryResolver

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FactoryResolver.



10
11
12
# File 'lib/payload/factory_resolver.rb', line 10

def initialize(block)
  @block = block
end

Instance Method Details

#resolve(container, decorators) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'lib/payload/factory_resolver.rb', line 14

def resolve(container, decorators)
  Factory.new(container, @block, decorators)
end