Class: Worque::Utils::Slack
- Inherits:
-
Object
- Object
- Worque::Utils::Slack
- Defined in:
- lib/worque/utils/slack.rb
Instance Method Summary collapse
-
#initialize(token) ⇒ Slack
constructor
A new instance of Slack.
- #post(channel, message) ⇒ Object
Constructor Details
#initialize(token) ⇒ Slack
Returns a new instance of Slack.
7 8 9 |
# File 'lib/worque/utils/slack.rb', line 7 def initialize(token) @token = token end |
Instance Method Details
#post(channel, message) ⇒ Object
11 12 13 |
# File 'lib/worque/utils/slack.rb', line 11 def post(channel, ) JSON.parse(post_form(channel, ).body) end |