Class: SlackbotFrd::SlackMethods::ChatDelete
- Inherits:
-
Object
- Object
- SlackbotFrd::SlackMethods::ChatDelete
- Includes:
- HTTParty
- Defined in:
- lib/slackbot_frd/slack_methods/chat_delete.rb
Class Method Summary collapse
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(token:, channel:, timestamp:) ⇒ ChatDelete
constructor
A new instance of ChatDelete.
Constructor Details
#initialize(token:, channel:, timestamp:) ⇒ ChatDelete
Returns a new instance of ChatDelete.
15 16 17 18 19 |
# File 'lib/slackbot_frd/slack_methods/chat_delete.rb', line 15 def initialize(token:, channel:, timestamp:) @token = token @channel = channel = end |
Class Method Details
.delete(token:, channel:, timestamp:) ⇒ Object
10 11 12 13 |
# File 'lib/slackbot_frd/slack_methods/chat_delete.rb', line 10 def self.delete(token:, channel:, timestamp:) r = ChatDelete.new(token: token, channel: channel, timestamp: ) r.delete end |
Instance Method Details
#delete ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/slackbot_frd/slack_methods/chat_delete.rb', line 21 def delete body = { token: @token, channel: @channel, ts: , } @response = self.class.post('', :body => body) ValidateSlack.response(@response) @response end |