module ProcessExecuter::Destinations

def self.factory(destination)

Raises:
  • (ArgumentError) - if no matching destination class is found

Returns:
  • (DestinationBase) - an instance of the appropriate destination handler

Parameters:
  • destination (Object) -- the destination to create a handler for
def self.factory(destination)
  matching_class = matching_destination_class(destination)
  return matching_class.new(destination) if matching_class
  raise ArgumentError, 'wrong exec redirect action'
end