Method: Uncool::Trace#setup
- Defined in:
- lib/uncool/trace.rb
#setup ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/uncool/trace.rb', line 26 def setup tracker = self TracePoint.trace do |tp| #puts "#{tp.self.class}\t#{tp.callee}\t#{tp.event}\t#{tp.return?}" if tp.event == 'call' or tp.event == 'c-call' if tracker.target?(tp.self.class) tracker.log << [tp.self, tp.callee] end end end end |