Module: Datadog::Contrib::RestClient::Patcher

Includes:
Patcher
Defined in:
lib/ddtrace/contrib/rest_client/patcher.rb

Overview

Patcher enables patching of ‘rest_client’ module.

Class Method Summary collapse

Methods included from Patcher

included

Class Method Details

.patchObject



14
15
16
17
18
19
20
21
# File 'lib/ddtrace/contrib/rest_client/patcher.rb', line 14

def patch
  do_once(:rest_client) do
    require 'ddtrace/ext/app_types'
    require 'ddtrace/contrib/rest_client/request_patch'

    ::RestClient::Request.send(:include, RequestPatch)
  end
end

.patched?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/ddtrace/contrib/rest_client/patcher.rb', line 10

def patched?
  done?(:rest_client)
end