Closed schattenhaar closed 9 years ago
maybe you could propose some api change to expose the registration of helpers?
This method already exists in HandlebarsEngine: registerHelper(String name, Helper<?> helper)
So I would add the missing methods also in HandlebarsEngine: registerHelpers(final Object helperSource) registerHelpers(final Class<?> helperSource) registerHelpers(final URI location) registerHelpers(final File input) registerHelpers(final String filename, final Reader source) registerHelpers(final String filename, final InputStream source) registerHelpers(final String filename, final String source) helpers() helper(final String name)
But all compile()-Methods are missing too. It would be easier to implement a method getHandlebars() { return handlebars; } to access all these methods.
I agree a single method getHandlebars is more powerful and less prone to break if api changes!
-----Original Message----- From: schattenhaar Sent: 06/11/2014, 23:47 To: pmlopes/yoke Cc: Paulo Lopes Subject: Re: [yoke] registerHelpers() for Handlebars are missing (#143)
This method already exists in HandlebarsEngine: registerHelper(String name, Helper<?> helper)
So I would add the missing methods also in HandlebarsEngine: registerHelpers(final Object helperSource) registerHelpers(final Class<?> helperSource) registerHelpers(final URI location) registerHelpers(final File input) registerHelpers(final String filename, final Reader source) registerHelpers(final String filename, final InputStream source) registerHelpers(final String filename, final String source) helpers() helper(final String name)
But all compile()-Methods are missing too. It would be easier to implement a method getHandlebars() { return handlebars; } to access all these methods.
Reply to this email directly or view it on GitHub: https://github.com/pmlopes/yoke/issues/143#issuecomment-62065826
All variants of registerHelpers() from Handlebars Java are missing in HandlebarsEngine.