Module: EvilEvents::Core::Events::Notifier::Builder Private

Defined in:
lib/evil_events/core/events/notifier/builder.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.3.0

Class Method Summary collapse

Class Method Details

.build_notifier!Notifier::Abstract, ...

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:

Raises:

  • EvilEvents::UnknownNotifierTypeError

Since:

  • 0.3.0



13
14
15
16
17
18
19
20
# File 'lib/evil_events/core/events/notifier/builder.rb', line 13

def build_notifier!
  case EvilEvents::Core::Bootstrap[:config].settings.notifier.type
  when :sequential then build_sequential_notifier!
  when :worker     then build_worker_notifier!
  else
    raise EvilEvents::UnknownNotifierTypeError
  end
end

.build_sequential_notifier!Notifier::Sequential (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.3.0



28
29
30
31
# File 'lib/evil_events/core/events/notifier/builder.rb', line 28

def build_sequential_notifier!
  options = EvilEvents::Core::Bootstrap[:config].to_h[:notifier][:sequential]
  Sequential.new(**options)
end

.build_worker_notifier!Notifier::Worker (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.3.0



37
38
39
40
# File 'lib/evil_events/core/events/notifier/builder.rb', line 37

def build_worker_notifier!
  options = EvilEvents::Core::Bootstrap[:config].to_h[:notifier][:worker]
  Worker.new(**options)
end