Class: Useless::Doc::Response
- Inherits:
-
Object
- Object
- Useless::Doc::Response
- Defined in:
- lib/useless/doc/response.rb,
lib/useless/doc/response/status.rb
Overview
Documentation for an HTTP response.
Defined Under Namespace
Classes: Status
Instance Attribute Summary collapse
-
#body ⇒ Body
Documentation for the body of the response.
-
#headers ⇒ Array<Header>
Documentation for the headers of the response.
-
#statuses ⇒ Array<Response::Status] documentation for the possible statuses of the response.
Array<Response::Status] documentation for the possible statuses of the response.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(attrs = {}) ⇒ Response
Returns a new instance of Response.
22 23 24 25 26 |
# File 'lib/useless/doc/response.rb', line 22 def initialize(attrs = {}) @statuses = attrs[:statuses] @headers = attrs[:headers] @body = attrs[:body] end |
Instance Attribute Details
#body ⇒ Body
Returns documentation for the body of the response.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/useless/doc/response.rb', line 17 class Response attr_accessor :statuses, :headers, :body # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @statuses = attrs[:statuses] @headers = attrs[:headers] @body = attrs[:body] end end |
#headers ⇒ Array<Header>
Returns documentation for the headers of the response.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/useless/doc/response.rb', line 17 class Response attr_accessor :statuses, :headers, :body # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @statuses = attrs[:statuses] @headers = attrs[:headers] @body = attrs[:body] end end |
#statuses ⇒ Array<Response::Status] documentation for the possible statuses of the response.
Returns Array<Response::Status] documentation for the possible statuses of the response.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/useless/doc/response.rb', line 17 class Response attr_accessor :statuses, :headers, :body # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @statuses = attrs[:statuses] @headers = attrs[:headers] @body = attrs[:body] end end |