class Byebug::LocalInterface
Interface class for standard byebug use.
Constants
- EOF_ALIAS
Public Class Methods
new()
click to toggle source
Calls superclass method
Byebug::Interface.new
# File lib/byebug/interfaces/local_interface.rb, line 9 def initialize super() @input = STDIN @output = STDOUT @error = STDERR end
Public Instance Methods
readline(prompt)
click to toggle source
Reads a single line of input using Readline. If Ctrl-C is pressed in the middle of input, the line is reset to only the prompt and we ask for input again. If Ctrl-D is pressed, it returns “continue”.
@param prompt Prompt to be displayed.
# File lib/byebug/interfaces/local_interface.rb, line 23 def readline(prompt) Readline.readline(prompt, false) || EOF_ALIAS rescue Interrupt puts('^C') retry end