Class: Barbeque::SlackClient
- Inherits:
-
Object
- Object
- Barbeque::SlackClient
- Defined in:
- lib/barbeque/slack_client.rb
Instance Method Summary collapse
-
#initialize(channel) ⇒ SlackClient
constructor
A new instance of SlackClient.
- #notify_failure(message) ⇒ Object
- #notify_success(message) ⇒ Object
Constructor Details
#initialize(channel) ⇒ SlackClient
Returns a new instance of SlackClient.
7 8 9 |
# File 'lib/barbeque/slack_client.rb', line 7 def initialize(channel) @channel = channel end |
Instance Method Details
#notify_failure(message) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/barbeque/slack_client.rb', line 21 def notify_failure() post_slack( attachments: [{ text: , color: 'danger', mrkdwn_in: ['text'], }], ) end |
#notify_success(message) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/barbeque/slack_client.rb', line 11 def notify_success() post_slack( attachments: [{ text: , color: 'good', mrkdwn_in: ['text'], }], ) end |