Module: Tracer

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

Defined Under Namespace

Modules: Color, Helper Classes: Base

Constant Summary collapse

VERSION =
"0.2.3"

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



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/tracer/irb.rb', line 14

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