Class: Break::DownCommand

Inherits:
TracePointCommand show all
Defined in:
lib/break/commands/down_command.rb

Instance Method Summary collapse

Methods inherited from TracePointCommand

#initialize, trace

Methods inherited from Command

#initialize

Constructor Details

This class inherits a constructor from Break::TracePointCommand

Instance Method Details

#executeObject



5
6
7
8
9
10
11
# File 'lib/break/commands/down_command.rb', line 5

def execute(*)
  if context.depth >= 0
    frontend.notify("Cannot go further down the stack")
  else
    super
  end
end

#execute_trace(trace) ⇒ Object



13
14
15
16
17
# File 'lib/break/commands/down_command.rb', line 13

def execute_trace(trace, *)
  trace.disable

  context!(*context.bindings, depth: context.depth + 1)
end