Dispatch to the right subclass based on the definition.

def get(cls, name, definition, output_dir):
        """
        Dispatch to the right subclass based on the definition.
        """
        if 'url' in definition:
            return URLResource(name, definition, output_dir)
        elif 'pypi' in definition:
            return PyPIResource(name, definition, output_dir)
        else:
            return Resource(name, definition, output_dir)