-class RouteMeta(type):
- """
- Metaclass to calculate controller methods
-
- Routes needs to be pre-seeded with a list of "controllers". For
- all descendents of RouteFS, the list of controllers is defined to
- be any non-private methods of the class that were not in the
- RouteFS class.
- """
- def __init__(cls, classname, bases, dict_):
- super(RouteMeta, cls).__init__(classname, bases, dict_)
- if bases != (fuse.Fuse,):
- new_funcs = set(dict_.keys()).difference(dir(RouteFS))
- cls.controllers([func for func in new_funcs \
- if not func.startswith('_')])