Class: Dispatcher::Discord::Types::Response
- Inherits:
-
Object
- Object
- Dispatcher::Discord::Types::Response
- Defined in:
- lib/bas/dispatcher/discord/types/response.rb
Overview
Represents a response received from Discord. It encapsulates essential information about the response, providing a structured way to handle and analyze Discord server responses.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
13 14 15 16 17 18 |
# File 'lib/bas/dispatcher/discord/types/response.rb', line 13 def initialize(response) @http_code = response.code @code = response["code"] @message = response. @response = response.response end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
11 12 13 |
# File 'lib/bas/dispatcher/discord/types/response.rb', line 11 def code @code end |
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
11 12 13 |
# File 'lib/bas/dispatcher/discord/types/response.rb', line 11 def http_code @http_code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
11 12 13 |
# File 'lib/bas/dispatcher/discord/types/response.rb', line 11 def @message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/bas/dispatcher/discord/types/response.rb', line 11 def response @response end |