Class MethodHelper
- java.lang.Object
-
- com.github.jknack.handlebars.helper.MethodHelper
-
-
Constructor Summary
Constructors Constructor Description MethodHelper(Method method, Object source)
Creates a newMethodHelper
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequence
apply(Object context, Options options)
Apply the helper to the context.
-
-
-
Constructor Detail
-
MethodHelper
public MethodHelper(Method method, Object source)
Creates a newMethodHelper
.- Parameters:
method
- The method to invoke. Required.source
- The source or instance object. Might be null.
-
-
Method Detail
-
apply
public CharSequence apply(Object context, Options options) throws IOException
Description copied from interface:Helper
Apply the helper to the context.- Specified by:
apply
in interfaceHelper<Object>
- Parameters:
context
- The context object.options
- The options object.- Returns:
- A string result.
- Throws:
IOException
- If a template cannot be loaded.
-
-