Class: GHI::Client::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/ghi/client.rb

Instance Method Summary collapse

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

#bodyObject



29
30
31
# File 'lib/ghi/client.rb', line 29

def body
  @body ||= JSON.parse @response.body
end

#last_pageObject



34
# File 'lib/ghi/client.rb', line 34

def last_page() links['last'] end

#next_pageObject



33
# File 'lib/ghi/client.rb', line 33

def next_page() links['next'] end