class ProcessExecuter::DestinationBase
@api private
classes that handle different types of output redirection.
Provides the common interface and functionality for all destination
Base class for all destination handlers
def self.compatible_with_monitored_pipe? = true
- Api: - private
Returns:
-
(Boolean)-
def self.compatible_with_monitored_pipe? = true
def self.handles?(destination)
-
(NotImplementedError)- if the subclass doesn't implement this method
Returns:
-
(Boolean)- true if this class can handle the destination
Parameters:
-
destination(Object) -- the destination to check
def self.handles?(destination) raise NotImplementedError end
def close; end
-
(void)-
def close; end
def compatible_with_monitored_pipe?
- Api: - private
Returns:
-
(Boolean)-
def compatible_with_monitored_pipe? self.class.compatible_with_monitored_pipe? end
def initialize(destination)
-
(DestinationBase)- a new destination handler instance
Parameters:
-
destination(Object) -- the destination to write to
def initialize(destination) @destination = destination @data_written = [] end
def string
-
(String)-
def string data_written.join end
def write(data)
-
(NotImplementedError)- if the subclass doesn't implement this method
Returns:
-
(void)-
Parameters:
-
data(String) -- the data to write
def write(data) @data_written << data end