Class Typhoeus::EasyFactory
In: lib/typhoeus/easy_factory.rb
Parent: Object

This is a Factory for easies to be used in the hydra. Before an easy is ready to be added to a multi the on_complete callback to be set. This is done by this class.

@api private

Methods

easy   get   new  

Constants

RENAMED_OPTIONS = { :auth_method => :httpauth, :connect_timeout => :connecttimeout, :encoding => :accept_encoding, :follow_location => :followlocation, :max_redirects => :maxredirs, :proxy_type => :proxytype, :ssl_cacert => :cainfo, :ssl_capath => :capath, :ssl_cert => :sslcert, :ssl_cert_type => :sslcerttype, :ssl_key => :sslkey, :ssl_key_password => :keypasswd, :ssl_key_type => :sslkeytype, :ssl_version => :sslversion, }
CHANGED_OPTIONS = { :disable_ssl_host_verification => :ssl_verifyhost, :disable_ssl_peer_verification => :ssl_verifypeer, :proxy_auth_method => :proxyauth, }
REMOVED_OPTIONS = Set.new([:cache_key_basis, :cache_timeout, :user_agent])
SANITIZE_IGNORE = Set.new([:method, :cache_ttl, :cache])
SANITIZE_TIMEOUT = Set.new([:timeout_ms, :connecttimeout_ms])

Attributes

hydra  [R]  Returns the hydra provided.

@return [ Typhoeus::Hydra ]

request  [R]  Returns the request provided.

@return [ Typhoeus::Request ]

Public Class methods

Create an easy factory.

@example Create easy factory.

  Typhoeus::Hydra::EasyFactory.new(request, hydra)

@param [ Request ] request The request to build an easy for. @param [ Hydra ] hydra The hydra to build an easy for.

Public Instance methods

Return the easy in question.

@example Return easy.

  easy_factory.easy

@return [ Ethon::Easy ] The easy.

Fabricated easy.

@example Prepared easy.

  easy_factory.get

@return [ Ethon::Easy ] The easy.

[Validate]