module AwsCleaner::Notify
Public Class Methods
notify_chat(msg, config)
click to toggle source
generic chat notification method
# File lib/aws-cleaner.rb, line 128 def self.notify_chat(msg, config) if config[:slack][:enable] notify_slack(msg, config) end end
notify_slack(msg, config)
click to toggle source
notify slack
# File lib/aws-cleaner.rb, line 119 def self.notify_slack(msg, config) slack = Slack::Poster.new(config[:slack][:webhook_url]) slack.channel = config[:slack][:channel] slack.username = config[:slack][:username] ||= 'aws-cleaner' slack.icon_emoji = config[:slack][:icon_emoji] ||= nil slack.send_message(msg) end