Method: NewRelic::Agent::MethodTracer::ClassMethods::AddMethodTracer#newrelic_method_exists?
- Defined in:
- lib/new_relic/agent/method_tracer.rb
#newrelic_method_exists?(method_name) ⇒ Boolean
Checks to see if the method we are attempting to trace actually exists or not. #add_method_tracer can’t do anything if the method doesn’t exist.
145 146 147 148 149 |
# File 'lib/new_relic/agent/method_tracer.rb', line 145 def newrelic_method_exists?(method_name) exists = method_defined?(method_name) || private_method_defined?(method_name) ::NewRelic::Agent.logger.error("Did not trace #{_nr_derived_class_name}##{method_name} because that method does not exist") unless exists exists end |