Sha256: 69686eb6f007fe2e26aab70fc2c4cd20b8ec942de03ab8e6d9bfb416db5cb019

Contents?: true

Size: 640 Bytes

Versions: 12

Compression:

Stored size: 640 Bytes

Contents

require 'byebug/history'

module Byebug
  #
  # Interface class for remote use of byebug.
  #
  class RemoteInterface < Interface
    def initialize(socket)
      super()
      @input = socket
      @output = socket
      @error = socket
    end

    def read_command(prompt)
      super("PROMPT #{prompt}")
    end

    def confirm(prompt)
      super("CONFIRM #{prompt}")
    end

    def close
      output.close
    rescue IOError
      errmsg('Error closing the interface...')
    end

    def readline(prompt)
      output.puts(prompt)

      result = input.gets
      fail IOError unless result

      result.chomp
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
byebug-8.2.2 lib/byebug/interfaces/remote_interface.rb
byebug-8.2.1 lib/byebug/interfaces/remote_interface.rb
byebug-8.2.0 lib/byebug/interfaces/remote_interface.rb
byebug-8.1.0 lib/byebug/interfaces/remote_interface.rb
byebug-8.0.1 lib/byebug/interfaces/remote_interface.rb
byebug-8.0.0 lib/byebug/interfaces/remote_interface.rb
byebug-7.0.0 lib/byebug/interfaces/remote_interface.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/byebug-5.0.0/lib/byebug/interfaces/remote_interface.rb
byebug-6.0.2 lib/byebug/interfaces/remote_interface.rb
byebug-6.0.1 lib/byebug/interfaces/remote_interface.rb
byebug-6.0.0 lib/byebug/interfaces/remote_interface.rb
byebug-5.0.0 lib/byebug/interfaces/remote_interface.rb