Class: Byebug::RemoteInterface
Instance Attribute Summary collapse
Attributes inherited from Interface
#command_queue, #restart_file
Instance Method Summary
collapse
Methods inherited from Interface
#errmsg, #escape, #format
Constructor Details
Returns a new instance of RemoteInterface.
7
8
9
10
11
|
# File 'lib/byebug/interfaces/remote_interface.rb', line 7
def initialize(socket)
super()
@socket = socket
@history = History.new
end
|
Instance Attribute Details
#history ⇒ Object
Returns the value of attribute history.
5
6
7
|
# File 'lib/byebug/interfaces/remote_interface.rb', line 5
def history
@history
end
|
Instance Method Details
#close ⇒ Object
13
14
15
16
|
# File 'lib/byebug/interfaces/remote_interface.rb', line 13
def close
@socket.close
rescue IOError
end
|
#confirm(prompt) ⇒ Object
18
19
20
|
# File 'lib/byebug/interfaces/remote_interface.rb', line 18
def confirm(prompt)
send_command "CONFIRM #{prompt}"
end
|
#print(*args) ⇒ Object
26
27
28
|
# File 'lib/byebug/interfaces/remote_interface.rb', line 26
def print(*args)
@socket.printf(escape(format(*args)))
end
|
#read_command(prompt) ⇒ Object
22
23
24
|
# File 'lib/byebug/interfaces/remote_interface.rb', line 22
def read_command(prompt)
send_command "PROMPT #{prompt}"
end
|