class Byebug::RemoteInterface

Interface class for remote use of byebug.

Public Class Methods

new(socket) click to toggle source
Calls superclass method Byebug::Interface.new
# File lib/byebug/interfaces/remote_interface.rb, line 9
def initialize(socket)
  super()
  @input = socket
  @output = socket
  @error = socket
end

Public Instance Methods

close() click to toggle source
# File lib/byebug/interfaces/remote_interface.rb, line 40
def close
  output.close
end
confirm(prompt) click to toggle source
Calls superclass method Byebug::Interface#confirm
# File lib/byebug/interfaces/remote_interface.rb, line 22
def confirm(prompt)
  super("CONFIRM #{prompt}")
rescue Errno::EPIPE, Errno::ECONNABORTED
  false
end
print(message) click to toggle source
Calls superclass method Byebug::Interface#print
puts(message) click to toggle source
Calls superclass method Byebug::Interface#puts
# File lib/byebug/interfaces/remote_interface.rb, line 34
def puts(message)
  super(message)
rescue Errno::EPIPE, Errno::ECONNABORTED
  nil
end
read_command(prompt) click to toggle source
Calls superclass method Byebug::Interface#read_command
# File lib/byebug/interfaces/remote_interface.rb, line 16
def read_command(prompt)
  super("PROMPT #{prompt}")
rescue Errno::EPIPE, Errno::ECONNABORTED
  "continue"
end
readline(prompt) click to toggle source
# File lib/byebug/interfaces/remote_interface.rb, line 44
def readline(prompt)
  puts(prompt)
  (input.gets || "continue").chomp
end