<filename>com/horizon/projectstash/src/main/Parser.py
'''
Created on 14 Jan 2018

@author: <NAME>
'''

class Parser:
    '''
    Parser class to parse objects
    '''


    def __init__(self):
        '''
        Constructor
        '''
    
    def getRepoName(self, url, project):
        preamble = project + '/'
        postamble = '.git'
        return url.split(preamble.lower(), 1)[1].split(postamble, 1)[0]
    
<filename>com/horizon/projectstash/src/main/Parser.py
'''
Created on 14 Jan 2018

@author: <NAME>
'''

class Parser:
    '''
    Parser class to parse objects
    '''


    def __init__(self):
        '''
        Constructor
        '''
    
    def getRepoName(self, url, project):
        preamble = project + '/'
        postamble = '.git'
        return url.split(preamble.lower(), 1)[1].split(postamble, 1)[0]
    
Created on 14 Jan 2018  @author: <NAME> Parser class to parse objects Constructor