Module: Ethon::Easy::Options::ClassMethods

Defined in:
lib/ethon/easy/options.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#available_optionsArray

Return the available options.

Examples:

Return the available options.

easy.available_options

Returns:

  • (Array)

    The available options.



32
33
34
# File 'lib/ethon/easy/options.rb', line 32

def available_options
  Ethon::Easy::AVAILABLE_OPTIONS
end

#bool_optionsArray

Return the options which need to set as 0 or 1 for easy.

Examples:

Return the bool options.

easy.bool_options

Returns:

  • (Array)

    The bool options.



42
43
44
45
46
47
# File 'lib/ethon/easy/options.rb', line 42

def bool_options
  [
    :followlocation, :forbid_reuse, :nosignal, :ssl_verifypeer,
    :verbose, :httpget, :nobody, :upload
  ]
end

#enum_optionsHash

Return the options which are an enum for easy.

Examples:

Return the enum options.

easy.enum_options

Returns:

  • (Hash)

    The enum options.



55
56
57
# File 'lib/ethon/easy/options.rb', line 55

def enum_options
  { :httpauth => Curl::Auth, :sslversion => Curl::SSLVersion }
end

#int_optionsArray

Return the options which need to set as an integer for easy.

Examples:

Return the int options.

easy.int_options

Returns:

  • (Array)

    The int options.



65
66
67
68
69
70
# File 'lib/ethon/easy/options.rb', line 65

def int_options
  [
    :connecttimeout, :connecttimeout_ms, :dns_cache_timeout, :infilesize, :maxredirs,
    :postfieldsize, :proxyport, :ssl_verifyhost, :timeout, :timeout_ms
  ]
end