Class: SimpleDeploy::Notifier::Slack
- Inherits:
-
Object
- Object
- SimpleDeploy::Notifier::Slack
- Defined in:
- lib/simple_deploy/notifier/slack.rb
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Slack
constructor
A new instance of Slack.
- #send(message) ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Slack
Returns a new instance of Slack.
7 8 9 10 |
# File 'lib/simple_deploy/notifier/slack.rb', line 7 def initialize(args = {}) @logger = SimpleDeploy.logger @notifier = ::Slack::Notifier.new SimpleDeploy.config.notifications['slack']['webhook_url'] end |
Instance Method Details
#send(message) ⇒ Object
12 13 14 15 16 |
# File 'lib/simple_deploy/notifier/slack.rb', line 12 def send() @logger.info "Sending Slack notification." @notifier.ping @logger.info "Slack notification complete." end |