Class: SidekiqVigil::Notifier::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq_vigil/notifier/base.rb

Direct Known Subclasses

Log, Slack, Webhook

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options: {}, logger: SidekiqVigil.logger, **_dependencies) ⇒ Base

Returns a new instance of Base.



8
9
10
11
# File 'lib/sidekiq_vigil/notifier/base.rb', line 8

def initialize(options: {}, logger: SidekiqVigil.logger, **_dependencies)
  @options = options
  @logger = logger
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



6
7
8
# File 'lib/sidekiq_vigil/notifier/base.rb', line 6

def logger
  @logger
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/sidekiq_vigil/notifier/base.rb', line 6

def options
  @options
end

Instance Method Details

#inspectObject



17
18
19
# File 'lib/sidekiq_vigil/notifier/base.rb', line 17

def inspect
  "#<#{self.class} options=[FILTERED]>"
end

#notify(_event) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/sidekiq_vigil/notifier/base.rb', line 13

def notify(_event)
  raise NotImplementedError, "#{self.class} must implement #notify"
end