Sha256: 4951c217012162fb88582c2f0d9b2d57461c9d8e65e95645121b3c9c4e87bcae
Contents?: true
Size: 611 Bytes
Versions: 8
Compression:
Stored size: 611 Bytes
Contents
# frozen_string_literal: true require_relative 'notifier/honeybadger_strategy' require_relative 'notifier/null_strategy' require_relative 'notifier/raise_strategy' module JunkDrawer # class to send dev notifications to different channels class Notifier include Callable class << self attr_accessor :strategy end STRATEGIES = { honeybadger: HoneybadgerStrategy, raise: RaiseStrategy, null: NullStrategy, }.freeze def call(*args) strategy.(*args) end private def strategy STRATEGIES.fetch(self.class.strategy) end end end
Version data entries
8 entries across 8 versions & 1 rubygems