Class: Quandl::Utility::ThorTasks::Notify

Inherits:
Thor
  • Object
show all
Defined in:
lib/quandl/utility/thor_tasks/notify.rb

Overview

Tasks for sending notifications

Instance Method Summary collapse

Instance Method Details

#slack(message, channel) ⇒ Object



34
35
36
37
38
39
# File 'lib/quandl/utility/thor_tasks/notify.rb', line 34

def slack(message, channel)
  slack_client = Slack::Notifier.new(options[:team], options[:token])
  slack_client.channel = channel
  slack_client.username = options[:botname]
  slack_client.ping(message, icon_emoji: options[:emoji])
end