Class: Debugger::RemoteInterface
- Inherits:
-
Object
- Object
- Debugger::RemoteInterface
- Defined in:
- lib/ruby-debug/interface.rb
Overview
:nodoc:
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(socket) ⇒ RemoteInterface
constructor
A new instance of RemoteInterface.
- #print(*args) ⇒ Object
- #read_command ⇒ Object
Constructor Details
#initialize(socket) ⇒ RemoteInterface
Returns a new instance of RemoteInterface.
18 19 20 |
# File 'lib/ruby-debug/interface.rb', line 18 def initialize(socket) @socket = socket end |
Instance Method Details
#close ⇒ Object
32 33 34 35 |
# File 'lib/ruby-debug/interface.rb', line 32 def close @socket.close rescue Exception end |
#print(*args) ⇒ Object
28 29 30 |
# File 'lib/ruby-debug/interface.rb', line 28 def print(*args) @socket.printf(*args) end |
#read_command ⇒ Object
22 23 24 25 26 |
# File 'lib/ruby-debug/interface.rb', line 22 def read_command result = @socket.non_blocking_gets raise IOError unless result result.chomp end |