Class IfHelper
- java.lang.Object
-
- com.github.jknack.handlebars.helper.IfHelper
-
- All Implemented Interfaces:
Helper<java.lang.Object>
public class IfHelper extends java.lang.Object implements Helper<java.lang.Object>
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
-
-
Constructor Summary
Constructors Constructor Description IfHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
apply(java.lang.Object context, Options options)
Apply the helper to the context.
-
-
-
Field Detail
-
INSTANCE
public static final Helper<java.lang.Object> INSTANCE
A singleton instance of this helper.
-
NAME
public static final java.lang.String NAME
The helper's name.- See Also:
- Constant Field Values
-
-