Class: GHI::Client::Response
- Inherits:
-
Object
- Object
- GHI::Client::Response
- Defined in:
- lib/ghi/client.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #last_page ⇒ Object
- #next_page ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
25 26 27 |
# File 'lib/ghi/client.rb', line 25 def initialize response @response = response end |
Instance Method Details
#body ⇒ Object
29 30 31 |
# File 'lib/ghi/client.rb', line 29 def body @body ||= JSON.parse @response.body end |
#last_page ⇒ Object
34 |
# File 'lib/ghi/client.rb', line 34 def last_page() links['last'] end |
#next_page ⇒ Object
33 |
# File 'lib/ghi/client.rb', line 33 def next_page() links['next'] end |