class StaticTracing::Tracer::Base

Public Class Methods

disable!() click to toggle source
# File lib/ruby-static-tracing/tracer/base.rb, line 27
def disable!
  modified_classes.each do |klass, wrapped_methods|
    klass.instance_eval { unprepend(wrapped_methods) }
  end
end
enable!() click to toggle source
# File lib/ruby-static-tracing/tracer/base.rb, line 21
def enable!
  modified_classes.each do |klass, wrapped_methods|
    klass.prepend(wrapped_methods)
  end
end
register(klass, *method_names, provider: nil) click to toggle source
# File lib/ruby-static-tracing/tracer/base.rb, line 13
def register(klass, *method_names, provider: nil)
  provider_name ||= underscore(klass.name)
  provider = Provider.register(provider_name)
  method_overrides = function_wrapper.new(provider, @wrapping_function, @data_types)
  modified_classes[klass] ||= method_overrides
  modified_classes[klass].add_override(method_names.flatten)
end