Method: ElasticAPM::Spies.hook_into

Defined in:
lib/elastic_apm/spies.rb

.hook_into(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



85
86
87
88
89
90
91
92
93
94
95
# File 'lib/elastic_apm/spies.rb', line 85

def self.hook_into(name)
  return unless (registration = require_hooks[name])
  return unless safe_defined?(registration.const_name)

  installed[registration.const_name] = registration
  registration.install

  registration.require_paths.each do |path|
    require_hooks.delete path
  end
end