Module: Typhoeus::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/typhoeus/config.rb

Overview

The Typhoeus configuration used to set global options.

Examples:

Set the configuration options within a block.

Typhoeus.configure do |config|
  config.verbose = true
end

Set the configuration direct.

Typhoeus::Config.verbose = true

Since:

  • 0.5.0

Instance Attribute Summary collapse

Instance Attribute Details

#block_connectionBoolean

Defines wether the connection is blocked. Defaults to false. When set to true, only stubbed requests are allowed. A Errors::NoStub error is raised, when trying to do a real request. Its possible to work around inside Typhoeus#with_connection.



29
30
31
# File 'lib/typhoeus/config.rb', line 29

def block_connection
  @block_connection
end

#memoizeBoolean

Defines wether GET requests are memoized when using the Hydra.

Returns:

  • (Boolean)

See Also:

Since:

  • 0.5.0



37
38
39
# File 'lib/typhoeus/config.rb', line 37

def memoize
  @memoize
end

#verboseBoolean

Defines wether curls debug output is shown. Unfortunately it prints to stderr.

Returns:

  • (Boolean)

See Also:

Since:

  • 0.5.0



45
46
47
# File 'lib/typhoeus/config.rb', line 45

def verbose
  @verbose
end