Class: SlackErrorNotifier::SlackNotification
- Inherits:
-
Object
- Object
- SlackErrorNotifier::SlackNotification
- Defined in:
- lib/slack_error_notifier/slack_notification.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error) ⇒ SlackNotification
constructor
A new instance of SlackNotification.
- #send ⇒ Object
Constructor Details
#initialize(error) ⇒ SlackNotification
Returns a new instance of SlackNotification.
3 4 5 |
# File 'lib/slack_error_notifier/slack_notification.rb', line 3 def initialize(error) @error = error end |
Class Method Details
.send(error) ⇒ Object
7 8 9 |
# File 'lib/slack_error_notifier/slack_notification.rb', line 7 def self.send(error) new(error).send end |
Instance Method Details
#send ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/slack_error_notifier/slack_notification.rb', line 11 def send slack_client.chat_postMessage( channel: target_channel, text: "", attachments: , as_user: send_as_user ) end |