Class MethodHelper
java.lang.Object
com.github.jknack.handlebars.helper.MethodHelper
Wrap a method as Handlebars helper.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MethodHelper
Creates a newMethodHelper.- Parameters:
method- The method to invoke. Required.source- The source or instance object. Might be null.
-
-
Method Details
-
apply
Description copied from interface:HelperApply the helper to the context.- Specified by:
applyin interfaceHelper<Object>- Parameters:
context- The context object.options- The options object.- Returns:
- A string result.
- Throws:
IOException- If a template cannot be loaded.
-