from word_processor.parsers import Parser


class JavascriptParser(Parser):

    def __init__(self, **kwargs):
        super().__init__(**kwargs)

    def parse_word(self, word: str):
        return word.text.title()

    def parse_words(self, words: [str]):
        parsed_words = super().parse_words(words)
        parsed_words.reverse()

        return parsed_words
