Method: ExceptionNotifier::SlackNotifier#initialize

Defined in:
lib/support/exception_slack_notify/exception_notification.rb

#initialize(options) ⇒ SlackNotifier

Returns a new instance of SlackNotifier.



12
13
14
15
16
17
18
19
20
# File 'lib/support/exception_slack_notify/exception_notification.rb', line 12

def initialize(options)
  begin
    webhook_url = options.fetch(:webhook_url)
    @message_opts = options.fetch(:additional_parameters, {})
    @notifier = Slack::Notifier.new webhook_url, options
  rescue
    @notifier = nil
  end
end