Class: Break::UpCommand

Inherits:
TracePointCommand show all
Defined in:
lib/break/commands/up_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/up_command.rb', line 5

def execute(*)
  if context.bindings[context.depth - 2]
    super
  else
    frontend.notify("Cannot go further up the stack")
  end
end

#execute_trace(trace) ⇒ Object



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

def execute_trace(trace, *)
  trace.disable

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