Class: GI::GIDSResponse
- Inherits:
-
Object
- Object
- GI::GIDSResponse
- Defined in:
- lib/gi/gids_response.rb
Class Method Summary collapse
-
.from(response) ⇒ GI::GIDSResponse
Builds a response with a ok status and a response’s body.
Instance Method Summary collapse
-
#body ⇒ Hash
The response body.
- #cache? ⇒ Boolean
-
#status ⇒ Integer
The response status.
Class Method Details
.from(response) ⇒ GI::GIDSResponse
Builds a response with a ok status and a response’s body
17 18 19 |
# File 'lib/gi/gids_response.rb', line 17 def self.from(response) GIDSResponse.new(status: response.status, body: response.body) end |
Instance Method Details
#body ⇒ Hash
Returns the response body.
11 |
# File 'lib/gi/gids_response.rb', line 11 attribute :body, Hash |
#cache? ⇒ Boolean
21 22 23 |
# File 'lib/gi/gids_response.rb', line 21 def cache? @status == 200 end |
#status ⇒ Integer
Returns the response status.
8 |
# File 'lib/gi/gids_response.rb', line 8 attribute :status, Integer |