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

Other tags:
    Api: - private

Returns:
  • (Boolean) -
def self.compatible_with_monitored_pipe? = true

def self.handles?(destination)

Raises:
  • (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

Returns:
  • (void) -
def close; end

def compatible_with_monitored_pipe?

Other tags:
    Api: - private

Returns:
  • (Boolean) -
def compatible_with_monitored_pipe?
  self.class.compatible_with_monitored_pipe?
end

def initialize(destination)

Returns:
  • (DestinationBase) - a new destination handler instance

Parameters:
  • destination (Object) -- the destination to write to
def initialize(destination)
  @destination = destination
  @data_written = []
end

def string

Returns:
  • (String) -
def string
  data_written.join
end

def write(data)

Raises:
  • (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