Module: SmartCore::Injection::DSL::ClassMethods Private

Defined in:
lib/smart_core/injection/dsl.rb

Overview

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

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#__smart_injection_injector__SmartCore::Injection::Injector

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:

Since:

  • 0.1.0



103
104
105
# File 'lib/smart_core/injection/dsl.rb', line 103

def __smart_injection_injector__
  @__smart_injection_injector__
end

#import(imports, memoize: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_MEMOIZE, access: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_ACCESS, bind: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_BINDING_STRATEGY, from: SmartCore::Injection::Injector::InjectionSettings::EMPTY_CONTAINER_DESTINATION) ⇒ void

This method returns an undefined value.

Parameters:

  • imports (Hash<String|Symbol,String>)
  • memoize (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_MEMOIZE)

    a customizable set of options

  • access (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_ACCESS)

    a customizable set of options

  • bind (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_BINDING_STRATEGY)

    a customizable set of options

  • from (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::EMPTY_CONTAINER_DESTINATION)

    a customizable set of options

Options Hash (memoize:):

  • (Boolean)

Options Hash (access:):

  • (Symbol)

Options Hash (bind:):

  • (Symbol)

Options Hash (from:):

  • (NilClass, SmartCore::Container)

Since:

  • 0.1.0



53
54
55
56
57
58
59
60
61
# File 'lib/smart_core/injection/dsl.rb', line 53

def import(
  imports,
  memoize: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_MEMOIZE,
  access: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_ACCESS,
  bind: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_BINDING_STRATEGY,
  from: SmartCore::Injection::Injector::InjectionSettings::EMPTY_CONTAINER_DESTINATION
)
  __smart_injection_injector__.inject(imports, memoize, access, bind, from)
end

#import_static(imports, memoize: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_MEMOIZE, access: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_ACCESS, bind: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_BINDING_STRATEGY, from: SmartCore::Injection::Injector::InjectionSettings::EMPTY_CONTAINER_DESTINATION) ⇒ void

This method returns an undefined value.

Parameters:

  • imports (Hash<String|Symbol,String>)
  • memoize (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_MEMOIZE)

    a customizable set of options

  • access (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_ACCESS)

    a customizable set of options

  • bind (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_BINDING_STRATEGY)

    a customizable set of options

  • from (Hash) (defaults to: SmartCore::Injection::Injector::InjectionSettings::EMPTY_CONTAINER_DESTINATION)

    a customizable set of options

Options Hash (memoize:):

  • (Boolean)

Options Hash (access:):

  • (Symbol)

Options Hash (bind:):

  • (Symbol)

Options Hash (from:):

  • (NilClass, SmartCore::Container)

Since:

  • 0.1.0



72
73
74
75
76
77
78
79
80
# File 'lib/smart_core/injection/dsl.rb', line 72

def import_static(
  imports,
  memoize: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_MEMOIZE,
  access: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_ACCESS,
  bind: SmartCore::Injection::Injector::InjectionSettings::DEFAULT_BINDING_STRATEGY,
  from: SmartCore::Injection::Injector::InjectionSettings::EMPTY_CONTAINER_DESTINATION
)
  __smart_injection_injector__.inject_static(imports, memoize, access, bind, from)
end

#linked_containersArray<SmartCore::Container>

Returns:

  • (Array<SmartCore::Container>)

Since:

  • 0.1.0



95
96
97
# File 'lib/smart_core/injection/dsl.rb', line 95

def linked_containers
  __smart_injection_injector__.associated_containers
end

#register_container(*containers) ⇒ void

This method returns an undefined value.

Parameters:

  • containers (Array<SmartCore::Container>)

Since:

  • 0.1.0



87
88
89
# File 'lib/smart_core/injection/dsl.rb', line 87

def register_container(*containers)
  __smart_injection_injector__.register_container(*containers)
end