pmlopes / yoke

Yoke is a middleware framework for Vert.x
http://pmlopes.github.io/yoke/
Apache License 2.0
157 stars 44 forks source link

registerHelpers() for Handlebars are missing #143

Closed schattenhaar closed 9 years ago

schattenhaar commented 9 years ago

All variants of registerHelpers() from Handlebars Java are missing in HandlebarsEngine.

pmlopes commented 9 years ago

maybe you could propose some api change to expose the registration of helpers?

schattenhaar commented 9 years ago

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.

pmlopes commented 9 years ago

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