def __init__ (self, key, logger, app):
    self._log = KeyAdapter(key, logger)
    self._app = app

    for k in dir(self):
      try:
        val = getattr(self, k)
        (path, methods) = val.route
      except TypeError:
        continue
      except AttributeError:
        continue

      try:
        app.add_url_rule(path, path.replace("/", "_"), val, methods=methods)
        self._log.debug("Added route for: %s with method <%s>" % (path, k))
      except Exception, e:
        self._log.exception("Adding URL Rule")
        continue
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/api/jsonrpc.py/Dispatcher.__init__/original