Class IfHelper
java.lang.Object
com.github.jknack.handlebars.helper.IfHelper
You can use the if helper to conditionally render a block. If its argument
returns false, null or empty list/array (a "falsy" value), Handlebars will
not render the block.
- Since:
- 0.3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INSTANCE
A singleton instance of this helper. -
NAME
The helper's name.- See Also:
-
-
Constructor Details
-
IfHelper
public IfHelper()
-
-
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.
-