from typing import Callable


def wrap_output_string(decorator: Callable) -> Callable:
    """Class decorator that applies a decorator to all methods of a class.

    Parameters
    ----------
    decorator : Callable
        decorator to apply

    Returns
    -------
    Callable
        class decorator
    """

    def decorate(cls):
        for attr in dir(cls):
            if (
                callable(getattr(cls, attr))
                and not attr.startswith("__")
                and not attr.startswith("_")
            ):
                setattr(cls, attr, decorator(getattr(cls, attr)))
        return cls

    return decorate