code: def rulejoin(class_rule, method_rule):
      
      if method_rule.startswith('/'):
          return method_rule
      else:
          return class_rule + ('' if class_rule.endswith('/') or not method_rule else '/') + method_rule
docs: Join class and method rules. Used internally by :class:`ClassView` to
      combine rules from the :func:`route` decorators on the class and on the
      individual view handler methods::
  
          >>> rulejoin('/', '')
          '/'
          >>> rulejoin('/', 'first')
          '/first'
          >>> rulejoin('/first', '/second')
          '/second'
          >>> rulejoin('/first', 'second')
          '/first/second'
          >>> rulejoin('/first/', 'second')
          '/first/second'
          >>> rulejoin('/first/<second>', '')
          '/first/<second>'
          >>> rulejoin('/first/<second>', 'third')
          '/first/<second>/third'