lib/appmap/trace.rb in appmap-0.51.1 vs lib/appmap/trace.rb in appmap-0.51.2
- old
+ new
@@ -1,13 +1,15 @@
# frozen_string_literal: true
module AppMap
module Trace
- class RubyMethod
+ class RubyMethod < SimpleDelegator
attr_reader :class_name, :static
def initialize(package, class_name, method, static)
+ super(method)
+
@package = package
@class_name = class_name
@method = method
@static = static
end
@@ -109,10 +111,10 @@
return unless @enabled
@last_package_for_thread[Thread.current.object_id] = package if package
@events << event
static = event.static if event.respond_to?(:static)
- @methods << Trace::RubyMethod.new(package, defined_class, method, static) \
+ record_method Trace::RubyMethod.new(package, defined_class, method, static) \
if package && defined_class && method && (event.event == :call)
end
# +method+ should be duck-typed to respond to the following:
# * package