Class: PrivatePlease::Tracking::TracePointProcessor
- Inherits:
-
Object
- Object
- PrivatePlease::Tracking::TracePointProcessor
- Defined in:
- lib/private_please/tracking/trace_point_processor.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ TracePointProcessor
constructor
A new instance of TracePointProcessor.
- #process(tp) ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(config) ⇒ TracePointProcessor
Returns a new instance of TracePointProcessor.
11 12 13 14 15 16 |
# File 'lib/private_please/tracking/trace_point_processor.rb', line 11 def initialize(config) @config = config @latest_tracepoints = Utils::TwoLevelStack.new @encountered_method_calls = Storage::CalledMethodsMemoryStore.new end |
Instance Method Details
#process(tp) ⇒ Object
18 19 20 21 22 |
# File 'lib/private_please/tracking/trace_point_processor.rb', line 18 def process(tp) return if untracked_code?(tp.path) remember_trace_point tp store_method_call_details if tp.event == :call end |
#result ⇒ Object
24 25 26 |
# File 'lib/private_please/tracking/trace_point_processor.rb', line 24 def result Result.new(@encountered_method_calls) end |