Class: Encryptbot::Slack

Inherits:
Object
  • Object
show all
Defined in:
lib/encryptbot/slack.rb

Class Method Summary collapse

Class Method Details

.notifierObject



10
11
12
# File 'lib/encryptbot/slack.rb', line 10

def self.notifier
  @notifier ||= Slack::Notifier.new Encryptbot.configuration.slack_webhook, username: Encryptbot.configuration.slack_bot_username
end

.post_message(message) ⇒ Object



4
5
6
7
8
# File 'lib/encryptbot/slack.rb', line 4

def self.post_message(message)
  unless Encryptbot.configuration.slack_webhook.nil?
    notifier.ping message
  end
end