Module: Ethon::Easies::Options::ClassMethods

Defined in:
lib/ethon/easies/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.



31
32
33
# File 'lib/ethon/easies/options.rb', line 31

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.



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

def bool_options
  [
    :followlocation, :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.



54
55
56
# File 'lib/ethon/easies/options.rb', line 54

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.



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

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