Class: WhoIsSlacking::SlackWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/whois_slacking.rb

Class Method Summary collapse

Class Method Details

.post_to_slack(message) ⇒ Object



104
105
106
107
# File 'lib/whois_slacking.rb', line 104

def self.post_to_slack(message)
  Slack.configure { |config| config.token = ENV["SLACK_TOKEN"] }
  Slack.chat_postMessage channel: slack_channel, text: message 
end

.slack_channelObject



100
101
102
# File 'lib/whois_slacking.rb', line 100

def self.slack_channel
  ENV["SLACK_CHANNEL"]
end