Class: Encryptbot::Slacker

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

Class Method Summary collapse

Class Method Details

.notifierObject



12
13
14
# File 'lib/encryptbot/slacker.rb', line 12

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

.post_message(message) ⇒ Object



6
7
8
9
10
# File 'lib/encryptbot/slacker.rb', line 6

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