class Byebug::LocalInterface - byebug-4.0.5 Documentation

# class Byebug::LocalInterface

Interface class for standard byebug use.

### Public Class Methods

new() click to toggle source
Calls superclass method Byebug::Interface.new

    # File lib/byebug/interfaces/local_interface.rb, line 6
    def initialize
      super()
      @input, @output, @error = STDIN, STDOUT, 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.

@param prompt Prompt to be displayed.

    # File lib/byebug/interfaces/local_interface.rb, line 18
    def readline(prompt)
      Readline.readline(prompt, false)
    rescue Interrupt
      puts('^C')
      retry
    end