Class: SmartCore::Container::Entities::Dependency Private

Inherits:
Base
  • Object
show all
Defined in:
lib/smart_core/container/entities/dependency.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.

Since:

  • 0.1.0

Direct Known Subclasses

MemoizedDependency

Instance Attribute Summary

Attributes inherited from Base

#external_name

Instance Method Summary collapse

Constructor Details

#initialize(dependency_name, dependency_definition) ⇒ void

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.

Parameters:

  • dependency_name (String)
  • dependency_definition (Proc)

Since:

  • 0.1.0



18
19
20
21
# File 'lib/smart_core/container/entities/dependency.rb', line 18

def initialize(dependency_name, dependency_definition)
  super(dependency_name)
  @dependency_definition = dependency_definition
end

Instance Method Details

#reveal(host_container = SmartCore::Container::NO_HOST_CONTAINER) ⇒ Any

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.

Parameters:

  • host_container (SmartCore::Container, NilClass) (defaults to: SmartCore::Container::NO_HOST_CONTAINER)

Returns:

  • (Any)

Since:

  • 0.1.0

Version:

  • 0.8.1



29
30
31
# File 'lib/smart_core/container/entities/dependency.rb', line 29

def reveal(host_container = SmartCore::Container::NO_HOST_CONTAINER)
  dependency_definition.call
end