Class: KapostDeploy::Slack::Notifier
- Inherits:
-
Object
- Object
- KapostDeploy::Slack::Notifier
- Defined in:
- lib/kapost_deploy/slack/notifier.rb
Overview
Wrapper for slack-notify gem
Instance Method Summary collapse
- #configured? ⇒ Boolean
-
#initialize(slack_config) ⇒ Notifier
constructor
A new instance of Notifier.
- #notify(message) ⇒ Object
Constructor Details
#initialize(slack_config) ⇒ Notifier
Returns a new instance of Notifier.
9 10 11 |
# File 'lib/kapost_deploy/slack/notifier.rb', line 9 def initialize(slack_config) self.slack_config = slack_config end |
Instance Method Details
#configured? ⇒ Boolean
18 19 20 |
# File 'lib/kapost_deploy/slack/notifier.rb', line 18 def configured? !slack_config.nil? end |
#notify(message) ⇒ Object
13 14 15 16 |
# File 'lib/kapost_deploy/slack/notifier.rb', line 13 def notify() return unless configured? slack.notify() end |