ice.py
def add(self, method, pattern, callback):
        """Add a route.

        Arguments:
          method (str): HTTP method, e.g. GET, POST, etc.
          pattern (str): Pattern that request paths must match.
          callback (str): Route handler that is invoked when a request
            path matches the *pattern*.
        """
        pat_type, pat = self._normalize_pattern(pattern)
        if pat_type == 'literal':
            self._literal[method][pat] = callback
        elif pat_type == 'wildcard':
            self._wildcard[method].append(WildcardRoute(pat, callback))
        else:
            self._regex[method].append(RegexRoute(pat, callback))
def add(self, method, pattern, callback):
        """Add a route.

        Arguments:
          method (str): HTTP method, e.g. GET, POST, etc.
          pattern (str): Pattern that request paths must match.
          callback (str): Route handler that is invoked when a request
            path matches the *pattern*.
        """
        pat_type, pat = self._normalize_pattern(pattern)
        if pat_type == 'literal':
            self._literal[method][pat] = callback
        elif pat_type == 'wildcard':
            self._wildcard[method].append(WildcardRoute(pat, callback))
        else:
            self._regex[method].append(RegexRoute(pat, callback))
def add ( self , method , pattern , callback ) : pat_type , pat = self . _normalize_pattern ( pattern ) if pat_type == 'literal' : self . _literal [ method ] [ pat ] = callback elif pat_type == 'wildcard' : self . _wildcard [ method ] . append ( WildcardRoute ( pat , callback ) ) else : self . _regex [ method ] . append ( RegexRoute ( pat , callback ) )
Add a route.

        Arguments:
          method (str): HTTP method, e.g. GET, POST, etc.
          pattern (str): Pattern that request paths must match.
          callback (str): Route handler that is invoked when a request
            path matches the *pattern*.
Add a route .