Class: Stoplight::Wiring::NotifierFactory
- Inherits:
-
Object
- Object
- Stoplight::Wiring::NotifierFactory
- Defined in:
- lib/stoplight/wiring/notifier_factory.rb
Class Method Summary collapse
-
.create(notifier:, error_notifier:) ⇒ Stoplight::Notifier::FailSafe
Wraps a notifier with fail-safe mechanisms.
Class Method Details
.create(notifier:, error_notifier:) ⇒ Stoplight::Notifier::FailSafe
Wraps a notifier with fail-safe mechanisms.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/stoplight/wiring/notifier_factory.rb', line 13 def create(notifier:, error_notifier:) case notifier in Infrastructure::Notifier::FailSafe if notifier.error_notifier == error_notifier notifier in Infrastructure::Notifier::FailSafe Infrastructure::Notifier::FailSafe.new(notifier: notifier.notifier, error_notifier:) else Infrastructure::Notifier::FailSafe.new(notifier:, error_notifier:) end end |