module Patron

Constants

VERSION

Public Class Methods

libcurl_version() click to toggle source

Returns the version of the embedded libcurl.

@return [String] libcurl version string
static VALUE libcurl_version(VALUE klass) {
  char* value = curl_version();
  UNUSED_ARGUMENT(klass);
  return rb_str_new2(value);
}
libcurl_version_exact() click to toggle source

Returns the version of the embedded libcurl.

@return [Array] an array of MAJOR, MINOR, PATCH integers
static VALUE libcurl_version_exact(VALUE klass) {
  UNUSED_ARGUMENT(klass);
  VALUE cv_major = INT2FIX(LIBCURL_VERSION_MAJOR);
  VALUE cv_minor = INT2FIX(LIBCURL_VERSION_MINOR);
  VALUE cv_patch = INT2FIX(LIBCURL_VERSION_PATCH);
  VALUE version_arr = rb_ary_new3(3, cv_major, cv_minor, cv_patch);
  return version_arr;
}
user_agent_string() click to toggle source

Returns the default User-Agent string @return [String]

# File lib/patron.rb, line 17
def self.user_agent_string
  @ua ||= "Patron/Ruby-%s-%s" % [version, libcurl_version]
end
version() click to toggle source

Returns the version number of the gem @return [String]

# File lib/patron.rb, line 11
def self.version
  VERSION
end