Creates a parser for the method based on the documentation.
        
        :return     <OptionParser>

def parser(self):
        """
        Creates a parser for the method based on the documentation.
        
        :return     <OptionParser>
        """
        usage = self.usage()
        if self.__doc__:
            usage += '\n' + nstr(self.__doc__)

        parse = PARSER_CLASS(usage=usage)

        shorts = {v: k for k, v in self.short_keys.items()}
        for key, default in self.cmd_opts.items():
            # default key, cannot be duplicated
            if key == 'help':
                continue

            try:
                short = '-' + shorts[key]
            except KeyError:
                short = ''

            if default is True:
                action = 'store_false'
            elif default is False:
                action = 'store_true'
            else:
                action = 'store'

            # add the option
            parse.add_option(short, '--%s' % key, action=action, default=default)

        return parse