Class: Trav3::Success
- Defined in:
- lib/trav3/response/success.rb
Overview
The results from queries return either Success
or RequestError
which both repsond with Hash like query methods for the JSON data or the Net::HTTP resonse object methods.
The Response
classes Success
and RequestError
forward method calls for all of the instance methods of a ResponseCollection
to the collection. And many of the methods calls for the Net::HTTP response are also available on this class and those method calls are forwarded to the response.
Instance Method Summary collapse
Methods inherited from Response
#[], #body, #code, #code_type, #count, #decode_content, #dig, #each, #each_header, #empty?, #entity, #fetch, #first, #follow, #get_fields, #has_key?, #hash?, #header, #http_version, #initialize, #inspect, #key?, #keys, #last, #message, #msg, #read_body, #read_header, #reading_body, #response, #uri, #value, #values
Constructor Details
This class inherits a constructor from Trav3::Response
Instance Method Details
#failure? ⇒ Boolean
17 18 19 |
# File 'lib/trav3/response/success.rb', line 17 def failure? false end |
#page ⇒ Pagination
7 8 9 |
# File 'lib/trav3/response/success.rb', line 7 def page Trav3::Pagination.new(travis, self) end |
#success? ⇒ Boolean
12 13 14 |
# File 'lib/trav3/response/success.rb', line 12 def success? true end |