Class: ProcessExecuter::Destinations::MonitoredPipe Private
- Inherits:
-
ProcessExecuter::DestinationBase
- Object
- ProcessExecuter::DestinationBase
- ProcessExecuter::Destinations::MonitoredPipe
- Defined in:
- lib/process_executer/destinations/monitored_pipe.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Handles monitored pipes
Instance Attribute Summary
Attributes inherited from ProcessExecuter::DestinationBase
Class Method Summary collapse
-
.handles?(destination) ⇒ Boolean
private
Determines if this class can handle the given destination.
Instance Method Summary collapse
-
#close
private
Closes the pipe if it's open.
-
#write(data) ⇒ Object
private
Writes data to the monitored pipe.
Methods inherited from ProcessExecuter::DestinationBase
#compatible_with_monitored_pipe?, compatible_with_monitored_pipe?, #initialize, #string
Constructor Details
This class inherits a constructor from ProcessExecuter::DestinationBase
Class Method Details
.handles?(destination) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Determines if this class can handle the given destination
34 35 36 |
# File 'lib/process_executer/destinations/monitored_pipe.rb', line 34 def self.handles?(destination) destination.is_a? ProcessExecuter::MonitoredPipe end |
Instance Method Details
#close
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Closes the pipe if it's open
26 27 28 |
# File 'lib/process_executer/destinations/monitored_pipe.rb', line 26 def close destination.close if destination.state == :open end |
#write(data) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Writes data to the monitored pipe
18 19 20 21 |
# File 'lib/process_executer/destinations/monitored_pipe.rb', line 18 def write(data) super destination.write data end |