class ProcessExecuter::Destinations::Writer

@api private
Handles generic objects that respond to write

def self.handles?(destination)

Returns:
  • (Boolean) - true if destination responds to write but is not an IO with fileno

Parameters:
  • destination (Object) -- the destination to check
def self.handles?(destination)
  destination.respond_to?(:write) && (!destination.respond_to?(:fileno) || destination.fileno.nil?)
end

def write(data)

Raises:
  • (NoMethodError) - if the destination doesn't respond to write

Returns:
  • (Object) - the return value of the destination's write method

Parameters:
  • data (String) -- the data to write
def write(data)
  super
  destination.write data
end