Module: Trace

Included in:
Kernel
Defined in:
lib/trace.rb

Overview

Copyright

Copyright © 2004, 2005 Nicolas Despres. All rights reserved.

Author

Nicolas Despres <[email protected]>.

License

Gnu General Public License.

Revision

$Id: /w/fey/ruby_ex/trunk/lib/trace.rb 7944 2005-09-06T23:27:27.929371Z ertai $

Instance Method Summary collapse

Instance Method Details

#trace_offObject



19
20
21
# File 'lib/trace.rb', line 19

def trace_off
  set_trace_func nil
end

#trace_onObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/trace.rb', line 8

def trace_on
  set_trace_func proc { |event, file, line, id, binding, classname|
    printf("%8s %s:%-2d %10s %8s\n",
           event,
           file,
           line,
           id,
           classname)
  }
end