lib/trace_location/event.rb in trace_location-0.4.0 vs lib/trace_location/event.rb in trace_location-0.9.0

- old
+ new

@@ -1,15 +1,18 @@ # frozen_string_literal: true module TraceLocation class Event # :nodoc: CLASS_FORMAT = /\A#<(?:Class|refinement)\:([A-Za-z0-9\:]+).*>\z/.freeze - attr_reader :event, :path, :lineno, :method_id, :defined_class, :hierarchy + attr_reader :id, :event, :path, :lineno, :caller_path, :caller_lineno, :method_id, :defined_class, :hierarchy - def initialize(event:, path:, lineno:, method_id:, defined_class:, hierarchy:) + def initialize(id:, event:, path:, lineno:, caller_path:, caller_lineno:, method_id:, defined_class:, hierarchy:) + @id = id @event = event @path = path @lineno = lineno + @caller_path = caller_path + @caller_lineno = caller_lineno @method_id = method_id @defined_class = defined_class @hierarchy = hierarchy.to_i end