public function renderTwig($template, array $parameters, $sourceDir)
    {
        $twig = new \Twig_Environment(
            new \Twig_Loader_Filesystem(array($sourceDir)), array(
                'debug' => true,
                'cache' => false,
                'strict_variables' => true,
                'autoescape' => false,
            )
        );

        // Ruby erb template syntax
        $lexer = new \Twig_Lexer(
            $twig, array(
                'tag_comment' => array('<%#', '%>'),
                'tag_block' => array('<%', '%>'),
                'tag_variable' => array('<%=', '%>'),
            )
        );

        $twig->setLexer($lexer);

        return $twig->render($template, $parameters);
    }