Method: ProcessExecuter::MonitoredPipe#state

Defined in:
lib/process_executer/monitored_pipe.rb

#stateSymbol (readonly)

The state of the pipe

Must be either :open, :closing, or :closed

  • :open - the pipe is open and data can be written to it
  • :closing - the pipe is being closed and data can no longer be written to it
  • :closed - the pipe is closed and data can no longer be written to it

Examples:

pipe = ProcessExecuter::MonitoredPipe.new($stdout)
pipe.state #=> :open
pipe.close
pipe.state #=> :closed

Returns:

  • (Symbol)

    the state of the pipe



245
246
247
# File 'lib/process_executer/monitored_pipe.rb', line 245

def state
  @state
end