Class: IRB::ExtendCommand::TraceCall

Inherits:
TraceCommand show all
Defined in:
lib/tracer/irb.rb

Instance Method Summary collapse

Methods inherited from TraceCommand

transform_args

Instance Method Details

#execute(*args) ⇒ Object



91
92
93
94
95
96
97
98
99
100
101
# File 'lib/tracer/irb.rb', line 91

def execute(*args)
  expression = args.first

  unless expression
    puts "Please provide the expression to trace. Usage: `trace_call <expression>`"
    return
  end

  b = irb_context.workspace.binding
  Tracer.trace_call { eval(expression, b) }
end