Class: Marvel::Api::Response
- Inherits:
-
Object
- Object
- Marvel::Api::Response
- Defined in:
- lib/marvel/api/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#etag ⇒ Object
readonly
Returns the value of attribute etag.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(status:, headers:, body:) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status:, headers:, body:) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 12 13 |
# File 'lib/marvel/api/response.rb', line 7 def initialize(status:, headers:, body:) @status = status @headers = headers @body = body parse_body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def body @body end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def count @count end |
#etag ⇒ Object (readonly)
Returns the value of attribute etag.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def etag @etag end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def headers @headers end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def offset @offset end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def results @results end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def status @status end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
4 5 6 |
# File 'lib/marvel/api/response.rb', line 4 def total @total end |