Class: Trav3::RequestError
- Defined in:
- lib/trav3/response/request_error.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
12 13 14 |
# File 'lib/trav3/response/request_error.rb', line 12 def failure? true end |
#success? ⇒ Boolean
7 8 9 |
# File 'lib/trav3/response/request_error.rb', line 7 def success? false end |