class Payload::ExportedDefinition
Decorates a base definition such as {ServiceResolver} to provide access to private dependencies in the {Container} from which the definition was exported.
Used internally by {DefinitionList}. Use {Container#export}.
@api private
Attributes
definition[R]
private_definitions[R]
Public Class Methods
new(definition, private_definitions)
click to toggle source
# File lib/payload/exported_definition.rb, line 10 def initialize(definition, private_definitions) @definition = definition @private_definitions = private_definitions end
Public Instance Methods
==(other)
click to toggle source
# File lib/payload/exported_definition.rb, line 19 def ==(other) other.is_a?(ExportedDefinition) && definition == other.definition && private_definitions == other.private_definitions end
resolve(container)
click to toggle source
# File lib/payload/exported_definition.rb, line 15 def resolve(container) definition.resolve(container.import(private_definitions)) end