Class: Dispatcher::Slack::Types::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/bas/dispatcher/slack/types/response.rb

Overview

Represents a response received from Slack. It encapsulates essential information about the response, providing a structured way to handle and analyze Slack server responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



13
14
15
16
17
# File 'lib/bas/dispatcher/slack/types/response.rb', line 13

def initialize(response)
  @http_code = response.code
  @message = response.message
  @body = response.body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



11
12
13
# File 'lib/bas/dispatcher/slack/types/response.rb', line 11

def body
  @body
end

#http_codeObject (readonly)

Returns the value of attribute http_code.



11
12
13
# File 'lib/bas/dispatcher/slack/types/response.rb', line 11

def http_code
  @http_code
end

#messageObject (readonly)

Returns the value of attribute message.



11
12
13
# File 'lib/bas/dispatcher/slack/types/response.rb', line 11

def message
  @message
end