asterisk_processor Namespace Reference


Data Structures

class  AsteriskProcessor
class  PathSegment

Functions

def simple_name
def snakify
def wikify


Function Documentation

def asterisk_processor::simple_name (   name  ) 

Removes the {markers} from a path segement.

@param name: Swagger path segement, with {pathVar} markers.

Definition at line 33 of file asterisk_processor.py.

00033                      :
00034     """Removes the {markers} from a path segement.
00035 
00036     @param name: Swagger path segement, with {pathVar} markers.
00037     """
00038     if name.startswith('{') and name.endswith('}'):
00039         return name[1:-1]
00040     return name
00041 
00042 
def wikify(str):

def asterisk_processor::snakify (   name  ) 

Helper to take a camelCase or dash-seperated name and make it
snake_case.

Definition at line 51 of file asterisk_processor.py.

00051                  :
00052     """Helper to take a camelCase or dash-seperated name and make it
00053     snake_case.
00054     """
00055     r = ''
00056     prior_lower = False
00057     for c in name:
00058         if c.isupper() and prior_lower:
00059             r += "_"
00060         if c is '-':
00061             c = '_'
00062         prior_lower = c.islower()
00063         r += c.lower()
00064     return r
00065 
00066 
class PathSegment(Stringify):

def asterisk_processor::wikify (   str  ) 

Escapes a string for the wiki.

@param str: String to escape

Definition at line 43 of file asterisk_processor.py.

00043                :
00044     """Escapes a string for the wiki.
00045 
00046     @param str: String to escape
00047     """
00048     return re.sub(r'([{}\[\]])', r'\\\1', str)
00049 
00050 
def snakify(name):


Generated on Thu Apr 16 06:41:37 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6