Sha256: 1fddd940b1e8a7e176d06bd897ba9c1e1a75c5e4bf53fdfaa500396e1f9c5529

Contents?: true

Size: 565 Bytes

Versions: 8

Compression:

Stored size: 565 Bytes

Contents

module Byebug
  #
  # Interface class for standard byebug use.
  #
  class LocalInterface < Interface
    def initialize
      super()
      @input, @output, @error = STDIN, STDOUT, STDERR
    end

    #
    # 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.
    #
    def readline(prompt)
      Readline.readline(prompt, false)
    rescue Interrupt
      puts('^C')
      retry
    end
  end
end

Version data entries

8 entries across 7 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/byebug-4.0.5/lib/byebug/interfaces/local_interface.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/byebug-4.0.5/lib/byebug/interfaces/local_interface.rb
byebug-4.0.5 lib/byebug/interfaces/local_interface.rb
byebug-4.0.4 lib/byebug/interfaces/local_interface.rb
byebug-4.0.3 lib/byebug/interfaces/local_interface.rb
byebug-4.0.2 lib/byebug/interfaces/local_interface.rb
byebug-4.0.1 lib/byebug/interfaces/local_interface.rb
byebug-4.0.0 lib/byebug/interfaces/local_interface.rb