Class: SmartCore::Injection::Injector::ContainerSet::AddingListener Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/injection/injector/container_set/adding_listener.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

Instance Method Summary collapse

Constructor Details

#initialize(listener) ⇒ 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:

  • listener (Proc)

Since:

  • 0.1.0



11
12
13
# File 'lib/smart_core/injection/injector/container_set/adding_listener.rb', line 11

def initialize(listener)
  @listener = listener
end

Instance Method Details

#notify(container) ⇒ 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.

Parameters:

  • cotnainer (SmartCore::Container)

Since:

  • 0.1.0



19
20
21
# File 'lib/smart_core/injection/injector/container_set/adding_listener.rb', line 19

def notify(container)
  listener.call(container)
end