Class: SmoothOperator::HttpHandlers::Typhoeus::RemoteCall
- Inherits:
-
Operator::RemoteCall
- Object
- Operator::RemoteCall
- SmoothOperator::HttpHandlers::Typhoeus::RemoteCall
- Defined in:
- lib/smooth_operator/http_handlers/typhoeus/remote_call.rb
Constant Summary
Constants inherited from Operator::RemoteCall
Operator::RemoteCall::HTTP_SUCCESS_CODES
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Attributes inherited from Operator::RemoteCall
#exception, #parsed_response, #protocol_handler, #raw_response, #response
Instance Method Summary collapse
-
#initialize(request) ⇒ RemoteCall
constructor
A new instance of RemoteCall.
- #parse_response ⇒ Object
Methods inherited from Operator::RemoteCall
#<<, #==, #code, #error?, #get_attributes, #ok?, #respond_to?, #successful_response?, #to_s
Constructor Details
#initialize(request) ⇒ RemoteCall
Returns a new instance of RemoteCall.
11 12 13 |
# File 'lib/smooth_operator/http_handlers/typhoeus/remote_call.rb', line 11 def initialize(request) @request = request end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SmoothOperator::Operator::RemoteCall
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
9 10 11 |
# File 'lib/smooth_operator/http_handlers/typhoeus/remote_call.rb', line 9 def request @request end |
Instance Method Details
#parse_response ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/smooth_operator/http_handlers/typhoeus/remote_call.rb', line 15 def parse_response begin @parse_response ||= ::HTTParty::Parser.call(@raw_response.body, :json) rescue nil end end |