Class: DropboxApiV2::Response
- Inherits:
-
Object
- Object
- DropboxApiV2::Response
- Defined in:
- lib/dropbox_api_v2/response.rb
Instance Method Summary collapse
- #body ⇒ Object
- #cursor ⇒ Object
-
#initialize(curl_response) ⇒ Response
constructor
A new instance of Response.
- #json ⇒ Object
Constructor Details
#initialize(curl_response) ⇒ Response
Returns a new instance of Response.
5 6 7 |
# File 'lib/dropbox_api_v2/response.rb', line 5 def initialize(curl_response) @curl_response = curl_response end |
Instance Method Details
#body ⇒ Object
13 14 15 |
# File 'lib/dropbox_api_v2/response.rb', line 13 def body @curl_response.body end |
#cursor ⇒ Object
17 18 19 |
# File 'lib/dropbox_api_v2/response.rb', line 17 def cursor body["cursor"] end |
#json ⇒ Object
9 10 11 |
# File 'lib/dropbox_api_v2/response.rb', line 9 def json JSON.parse(body) end |