Class: Ask::SessionProtocol::Host::SpawnResult

Inherits:
Data
  • Object
show all
Defined in:
lib/ask/session_protocol/host.rb

Overview

A spawned host subprocess.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client

Returns:

  • the current value of client



17
18
19
# File 'lib/ask/session_protocol/host.rb', line 17

def client
  @client
end

#processObject (readonly)

Returns the value of attribute process

Returns:

  • the current value of process



17
18
19
# File 'lib/ask/session_protocol/host.rb', line 17

def process
  @process
end

#socket_pathObject (readonly)

Returns the value of attribute socket_path

Returns:

  • the current value of socket_path



17
18
19
# File 'lib/ask/session_protocol/host.rb', line 17

def socket_path
  @socket_path
end

#stderrObject (readonly)

Returns the value of attribute stderr

Returns:

  • the current value of stderr



17
18
19
# File 'lib/ask/session_protocol/host.rb', line 17

def stderr
  @stderr
end

Instance Method Details

#closeObject

Close the client and reap the subprocess.



19
20
21
22
23
# File 'lib/ask/session_protocol/host.rb', line 19

def close
  client.close
  stderr.close rescue nil
  process&.wait rescue nil
end