Class: Debugger::RemoteInterface
- Defined in:
- lib/ruby-debug-ide/interface.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#command_queue ⇒ Object
Returns the value of attribute command_queue.
-
#socket ⇒ Object
Returns the value of attribute socket.
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.
28 29 30 31 |
# File 'lib/ruby-debug-ide/interface.rb', line 28 def initialize(socket) @socket = socket @command_queue = Queue.new end |
Instance Attribute Details
#command_queue ⇒ Object
Returns the value of attribute command_queue.
25 26 27 |
# File 'lib/ruby-debug-ide/interface.rb', line 25 def command_queue @command_queue end |
#socket ⇒ Object
Returns the value of attribute socket.
26 27 28 |
# File 'lib/ruby-debug-ide/interface.rb', line 26 def socket @socket end |
Instance Method Details
#close ⇒ Object
43 44 45 46 |
# File 'lib/ruby-debug-ide/interface.rb', line 43 def close @socket.close rescue Exception end |
#print(*args) ⇒ Object
39 40 41 |
# File 'lib/ruby-debug-ide/interface.rb', line 39 def print(*args) @socket.printf(*args) end |
#read_command ⇒ Object
33 34 35 36 37 |
# File 'lib/ruby-debug-ide/interface.rb', line 33 def read_command result = @socket.non_blocking_gets raise IOError unless result result.chomp end |