Class: Remind::Service::Notifier
- Inherits:
-
Object
- Object
- Remind::Service::Notifier
- Extended by:
- Helper::ErrorHandler
- Defined in:
- lib/remind/services/notifier.rb
Class Method Summary collapse
-
.notify(message) ⇒ Object
Send message to slack.
Methods included from Helper::ErrorHandler
Methods included from Helper::LogHandler
Class Method Details
.notify(message) ⇒ Object
Send message to slack
14 15 16 17 18 19 20 |
# File 'lib/remind/services/notifier.rb', line 14 def self.notify() handle_errors do payload = { "text": }.to_json uri = URI(ENV['SLACK_WEBHOOK_URL']) Net::HTTP.post(uri, payload, 'Content-Type' => 'application/json') end end |