gears/asset_handler.py
def as_handler(cls, **initkwargs):
        """Converts the class into an actual handler function that can be used
        when registering different types of processors in
        :class:`~gears.environment.Environment` class instance.

        The arguments passed to :meth:`as_handler` are forwarded to the
        constructor of the class.
        """
        @wraps(cls, updated=())
        def handler(asset, *args, **kwargs):
            return handler.handler_class(**initkwargs)(asset, *args, **kwargs)
        handler.handler_class = cls
        handler.supports_check_mode = cls.supports_check_mode
        return handler
def as_handler(cls, **initkwargs):
        """Converts the class into an actual handler function that can be used
        when registering different types of processors in
        :class:`~gears.environment.Environment` class instance.

        The arguments passed to :meth:`as_handler` are forwarded to the
        constructor of the class.
        """
        @wraps(cls, updated=())
        def handler(asset, *args, **kwargs):
            return handler.handler_class(**initkwargs)(asset, *args, **kwargs)
        handler.handler_class = cls
        handler.supports_check_mode = cls.supports_check_mode
        return handler
def as_handler ( cls , * * initkwargs ) : @ wraps ( cls , updated = ( ) ) def handler ( asset , * args , * * kwargs ) : return handler . handler_class ( * * initkwargs ) ( asset , * args , * * kwargs ) handler . handler_class = cls handler . supports_check_mode = cls . supports_check_mode return handler
Converts the class into an actual handler function that can be used
        when registering different types of processors in
        :class:`~gears.environment.Environment` class instance.

        The arguments passed to :meth:`as_handler` are forwarded to the
        constructor of the class.
Converts the class into an actual handler function that can be used when registering different types of processors in : class : ~gears . environment . Environment class instance .