Class: EvilEvents::Core::Broadcasting::Emitter::AdapterProxy Private

Inherits:
Object
  • Object
show all
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.

Since:

  • 0.4.0

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:

Options Hash (explicit_identifier:):

  • (Symbol, NilClass)

Since:

  • 0.4.0



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

#adapterEvilEvents::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

#eventEvilEvents::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.

Returns:

Since:

  • 0.4.0



38
39
40
# File 'lib/evil_events/core/broadcasting/emitter/adapter_proxy.rb', line 38

def event
  @event
end

#identifierSymbol (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.

Returns:

  • (Symbol)

Since:

  • 0.4.0



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.

Since:

  • 0.4.0



28
29
30
# File 'lib/evil_events/core/broadcasting/emitter/adapter_proxy.rb', line 28

def broadcast!
  adapter.call(event)
end