docs: def build_rule(cls, rule, method=None):
          """Creates a routing rule based on either the class name (minus the
          'View' suffix) or the defined `base_route` attribute of the class
  
          :param rule: the path portion that should be appended to the
                       route base
  
          :param method: if a method's arguments should be considered when
                         constructing the rule, provide a reference to the
                         method here. arguments named "self" will be ignored
          """
  
          rule_parts = []
  
          if cls.route_prefix:
              rule_parts.append(cls.route_prefix)
  
          base_route = cls.get_base_route()
          if base_route:
              rule_parts.append(base_route)
  
          rule_parts.append(rule)
          ignored_rule_args = ['self']
          if hasattr(cls, 'base_args'):
              ignored_rule_args += cls.base_args
  
          if method:
              args = get_true_argspec(method)[0]
              for arg in args:
                  if arg not in ignored_rule_args:
                      rule_parts.append("<%s>" % arg)
  
          result = "/%s" % "/".join(rule_parts)
          return re.sub(r'(/)\1+', r'\1', result)