Module: Tracer

Extended by:
Helper
Defined in:
lib/ruby_tracer.rb,
lib/ruby_tracer/irb.rb,
lib/ruby_tracer/base.rb,
lib/ruby_tracer/color.rb,
lib/ruby_tracer/version.rb

Defined Under Namespace

Modules: Color, Helper Classes: Base

Constant Summary collapse

VERSION =
"0.3.1"

Constants included from Helper

Helper::DEPTH_OFFSET

Class Method Summary collapse

Methods included from Helper

trace, trace_call, trace_exception

Class Method Details

.register_irb_commandsObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/ruby_tracer/irb.rb', line 5

def self.register_irb_commands
  ec = IRB::ExtendCommandBundle.instance_variable_get(:@EXTEND_COMMANDS)

  [
    [:trace, :Trace, nil, [:trace, IRB::ExtendCommandBundle::OVERRIDE_ALL]],
    [
      :trace_call,
      :TraceCall,
      nil,
      [:trace_call, IRB::ExtendCommandBundle::OVERRIDE_ALL]
    ],
    [
      :trace_exception,
      :TraceException,
      nil,
      [:trace_exception, IRB::ExtendCommandBundle::OVERRIDE_ALL]
    ]
  ].each do |ecconfig|
    ec.push(ecconfig)
    IRB::ExtendCommandBundle.def_extend_command(*ecconfig)
  end
end