class ProcessExecuter::Destinations::Writer

def self.handles?(destination)

Returns:
  • (Boolean) - true if destination responds to #write and is not an IO object with a #fileno

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