Class: Debugger::RemoteInterface

Inherits:
Interface show all
Defined in:
lib/ruby-debug-ide/interface.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

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_queueObject

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

#socketObject

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

#closeObject



43
44
45
46
# File 'lib/ruby-debug-ide/interface.rb', line 43

def close
  @socket.close
rescue Exception
end


39
40
41
# File 'lib/ruby-debug-ide/interface.rb', line 39

def print(*args)
  @socket.printf(*args)
end

#read_commandObject

Raises:

  • (IOError)


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