Class: Foobara::CommandConnector::Response
- Inherits:
-
Object
- Object
- Foobara::CommandConnector::Response
- Defined in:
- foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#request ⇒ Object
Returns the value of attribute request.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #command ⇒ Object
- #error ⇒ Object
-
#initialize(request:, status: nil, body: nil) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(request:, status: nil, body: nil) ⇒ Response
Returns a new instance of Response.
8 9 10 11 12 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb', line 8 def initialize(request:, status: nil, body: nil) self.request = request self.status = status self.body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb', line 4 def body @body end |
#request ⇒ Object
Returns the value of attribute request.
4 5 6 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb', line 4 def request @request end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb', line 4 def status @status end |
Instance Method Details
#command ⇒ Object
14 15 16 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb', line 14 def command request.command end |
#error ⇒ Object
18 19 20 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb', line 18 def error request.error end |
#success? ⇒ Boolean
22 23 24 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/response.rb', line 22 def success? request.success? end |