Class: Byebug::ControlProcessor

Inherits:
CommandProcessor show all
Defined in:
lib/byebug/processors/control_processor.rb

Overview

Processes commands when there’s not program running

Instance Attribute Summary

Attributes inherited from CommandProcessor

#context, #prev_line

Instance Method Summary collapse

Methods inherited from CommandProcessor

#at_breakpoint, #at_catchpoint, #at_end, #at_line, #at_return, #at_tracing, #command_list, #interface, #printer, #proceed!, #process_commands

Methods included from Helpers::EvalHelper

#error_eval, #multiple_thread_eval, #separate_thread_eval, #silent_eval, #warning_eval

Constructor Details

#initialize(context = nil) ⇒ ControlProcessor

Returns a new instance of ControlProcessor.



8
9
10
# File 'lib/byebug/processors/control_processor.rb', line 8

def initialize(context = nil)
  @context = context
end

Instance Method Details

#commandsObject

Available commands



15
16
17
# File 'lib/byebug/processors/control_processor.rb', line 15

def commands
  super.select(&:allow_in_control)
end

#promptObject

Prompt shown before reading a command.



22
23
24
# File 'lib/byebug/processors/control_processor.rb', line 22

def prompt
  '(byebug:ctrl) '
end