Class: Taperole::Notifiers::Slack
- Inherits:
-
Object
- Object
- Taperole::Notifiers::Slack
- Defined in:
- lib/taperole/notifiers/slack.rb
Instance Method Summary collapse
-
#initialize(webhook_url, deploy_info) ⇒ Slack
constructor
A new instance of Slack.
- #update(status) ⇒ Object
Constructor Details
#initialize(webhook_url, deploy_info) ⇒ Slack
Returns a new instance of Slack.
6 7 8 9 10 |
# File 'lib/taperole/notifiers/slack.rb', line 6 def initialize(webhook_url, deploy_info) @notifier = ::Slack::Notifier.new webhook_url @notifier.username = 'Tape' @deploy_info = deploy_info end |
Instance Method Details
#update(status) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/taperole/notifiers/slack.rb', line 12 def update(status) @status = status @notifier.ping( "", # TODO: Fill in real icon url icon_url: 'https://image.freepik.com/free-icon/adhesive-tape_318-42276.png', attachments: ) end |