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.



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

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.



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

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