class AlertSlack
Email alert class Uses localhost for sending email - Probably need to change this in the future.
Public Instance Methods
send(slack_url, slack_channel, body)
click to toggle source
# File lib/alert/slack.rb, line 8 def send(slack_url, slack_channel, body) payload = Hash[ 'channel', slack_channel, 'text', body.to_json, ] RestClient.post slack_url, payload.to_json, {content_type: :json} rescue Errno::ECONNREFUSED puts "*** Conection refused while attempting to connect to SMTP server\n" \ "*** Recipient, #{@destination}. Body,\n" \ "*** #{@body}\n" end