Class: EvilEvents::Core::Broadcasting::Emitter::AdapterProxy Private
- Inherits:
-
Object
- Object
- EvilEvents::Core::Broadcasting::Emitter::AdapterProxy
- Defined in:
- lib/evil_events/core/broadcasting/emitter/adapter_proxy.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.
Instance Attribute Summary collapse
- #adapter ⇒ EvilEvents::Core::Broadcasting::Dispatcher::Mixin readonly private private
- #event ⇒ EvilEvents::Core::Events::AbstractEvent readonly private private
- #identifier ⇒ Symbol readonly private
Instance Method Summary collapse
- #broadcast! ⇒ void private
-
#initialize(event, explicit_identifier: nil) ⇒ AdapterProxy
constructor
private
A new instance of AdapterProxy.
Constructor Details
#initialize(event, explicit_identifier: nil) ⇒ AdapterProxy
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 AdapterProxy.
18 19 20 21 22 |
# File 'lib/evil_events/core/broadcasting/emitter/adapter_proxy.rb', line 18 def initialize(event, explicit_identifier: nil) @event = event @identifier = explicit_identifier || event.adapter_name @adapter = EvilEvents::Core::Bootstrap[:event_system].resolve_adapter(@identifier) end |
Instance Attribute Details
#adapter ⇒ EvilEvents::Core::Broadcasting::Dispatcher::Mixin (readonly, private)
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.
44 45 46 |
# File 'lib/evil_events/core/broadcasting/emitter/adapter_proxy.rb', line 44 def adapter @adapter end |
#event ⇒ EvilEvents::Core::Events::AbstractEvent (readonly, private)
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.
38 39 40 |
# File 'lib/evil_events/core/broadcasting/emitter/adapter_proxy.rb', line 38 def event @event end |
#identifier ⇒ Symbol (readonly)
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.
11 12 13 |
# File 'lib/evil_events/core/broadcasting/emitter/adapter_proxy.rb', line 11 def identifier @identifier end |
Instance Method Details
#broadcast! ⇒ 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.
This method returns an undefined value.
28 29 30 |
# File 'lib/evil_events/core/broadcasting/emitter/adapter_proxy.rb', line 28 def broadcast! adapter.call(event) end |