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  

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]