Class: Debugger::RemoteInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-debug/interface.rb

Overview

:nodoc:

Instance Method Summary collapse

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

#closeObject



32
33
34
35
# File 'lib/ruby-debug/interface.rb', line 32

def close
  @socket.close
rescue Exception
end


28
29
30
# File 'lib/ruby-debug/interface.rb', line 28

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

#read_commandObject

Raises:

  • (IOError)


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