Class: JunkDrawer::Notifier

Inherits:
Object
  • Object
show all
Includes:
Callable
Defined in:
lib/junk_drawer/notifier.rb,
lib/junk_drawer/notifier/null_strategy.rb,
lib/junk_drawer/notifier/raise_strategy.rb,
lib/junk_drawer/notifier/honeybadger_strategy.rb

Overview

class to send dev notifications to different channels

Defined Under Namespace

Classes: HoneybadgerStrategy, NullStrategy, RaiseStrategy

Constant Summary collapse

STRATEGIES =
{
  honeybadger: HoneybadgerStrategy,
  raise: RaiseStrategy,
  null: NullStrategy,
}.freeze

Class Attribute Summary collapse

Instance Method Summary collapse

Methods included from Callable

included, #to_proc

Class Attribute Details

.strategyObject

Returns the value of attribute strategy.



15
16
17
# File 'lib/junk_drawer/notifier.rb', line 15

def strategy
  @strategy
end

Instance Method Details

#call(*args) ⇒ Object



25
26
27
# File 'lib/junk_drawer/notifier.rb', line 25

def call(*args)
  strategy.(*args)
end