Module: Ethon::Easy::Features

Included in:
Ethon::Easy
Defined in:
lib/ethon/easy/features.rb

Overview

This module contains class methods for feature checks

Instance Method Summary collapse

Instance Method Details

#supports_asynch_dns?Boolean Also known as: supports_timeout_ms?

Returns true if this curl version supports AsynchDNS.

Examples:

Ethon::Easy.supports_asynch_dns?

Returns:

  • (Boolean)

    True if supported, else false.


22
23
24
# File 'lib/ethon/easy/features.rb', line 22

def supports_asynch_dns?
  !!(Curl.version_info[:features] & Curl::VERSION_ASYNCHDNS)
end

#supports_zlib?Boolean

Returns true if this curl version supports zlib.

Examples:

Return wether zlib is supported.

Ethon::Easy.supports_zlib?

Returns:

  • (Boolean)

    True if supported, else false.


12
13
14
# File 'lib/ethon/easy/features.rb', line 12

def supports_zlib?
  !!(Curl.version_info[:features] & Curl::VERSION_LIBZ)
end