Class: SlackbotFrd::SlackMethods::ImOpen
- Inherits:
-
Object
- Object
- SlackbotFrd::SlackMethods::ImOpen
- Includes:
- HTTParty
- Defined in:
- lib/slackbot_frd/slack_methods/im_open.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(token:, user:) ⇒ ImOpen
constructor
A new instance of ImOpen.
- #openChannel ⇒ Object
Constructor Details
#initialize(token:, user:) ⇒ ImOpen
Returns a new instance of ImOpen.
18 19 20 21 |
# File 'lib/slackbot_frd/slack_methods/im_open.rb', line 18 def initialize(token:, user:) @token = token @user = user end |
Class Method Details
Instance Method Details
#openChannel ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/slackbot_frd/slack_methods/im_open.rb', line 23 def openChannel body = { token: @token, user: @user } @response = self.class.post('', :body => body) @response.body end |