Class: TestR::Client::Transceiver

Inherits:
Receiver
  • Object
show all
Defined in:
lib/testr/client.rb

Instance Method Summary (collapse)

Constructor Details

- (Transceiver) initialize(*popen_args)



19
20
21
22
23
# File 'lib/testr/client.rb', line 19

def initialize *popen_args
  @io_write_lock = Mutex.new
  popen_args[1] = 'w+'
  super
end

Instance Method Details

- (Object) quit



32
33
34
35
# File 'lib/testr/client.rb', line 32

def quit
  send [:quit]
  super
end

- (Object) send(command)



25
26
27
28
29
30
# File 'lib/testr/client.rb', line 25

def send command
  @io_write_lock.synchronize do
    warn "#{caller[2]} SEND #{command.inspect}" if $DEBUG
    @io.puts JSON.dump(command)
  end
end