Method: Typhoeus::RemoteMethod#initialize
- Defined in:
- lib/typhoeus/remote_method.rb
#initialize(options = {}) ⇒ RemoteMethod
Returns a new instance of RemoteMethod.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/typhoeus/remote_method.rb', line 5 def initialize( = {}) @http_method = .delete(:method) || :get @options = @base_uri = .delete(:base_uri) @path = .delete(:path) @on_success = [:on_success] @on_failure = [:on_failure] @cache_responses = .delete(:cache_responses) @memoize_responses = .delete(:memoize_responses) || @cache_responses @cache_ttl = @cache_responses == true ? 0 : @cache_responses @keys = nil clear_cache end |