def directive(func):
    """
    Decorator for 'directives' -- options that invoke a method instead of
    storing a value.

    @directive
    def someDirective(self, value):
        self.dostuff()
    """
    func.cfg_is_directive = True
    return func