Class: Slack::RPC::Response
- Inherits:
-
Object
- Object
- Slack::RPC::Response
- Defined in:
- lib/slack/rpc/response.rb
Overview
## Slack::RPC::Response A class that represents Slack-RPC style command response
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(faraday_response) ⇒ Response
constructor
### Slack::RPC::Response.new(faraday_response) Creates a new instance of
Slack::RPC::Responseclass.
Constructor Details
#initialize(faraday_response) ⇒ Response
### Slack::RPC::Response.new(faraday_response) Creates a new instance of Slack::RPC::Response class
13 14 15 16 17 |
# File 'lib/slack/rpc/response.rb', line 13 def initialize(faraday_response) @status = faraday_response.status @headers = faraday_response.headers @body = faraday_response.body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
8 9 10 |
# File 'lib/slack/rpc/response.rb', line 8 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
8 9 10 |
# File 'lib/slack/rpc/response.rb', line 8 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/slack/rpc/response.rb', line 8 def status @status end |