com.github.jknack.handlebars.helper
Class UnlessHelper
java.lang.Object
com.github.jknack.handlebars.helper.UnlessHelper
- All Implemented Interfaces:
- Helper<Object>
public class UnlessHelper
- extends Object
- implements Helper<Object>
You can use the unless helper as the inverse of the if helper. Its block
will be rendered if the expression returns a falsy value.
- Since:
- 0.3.0
- Author:
- edgar.espina
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final Helper<Object> INSTANCE
- A singleton instance of this helper.
NAME
public static final String NAME
- The helper's name.
- See Also:
- Constant Field Values
UnlessHelper
public UnlessHelper()
apply
public CharSequence apply(Object context,
Options options)
throws IOException
- Description copied from interface:
Helper
- Callback method for execute the given method.
- Specified by:
apply in interface Helper<Object>
- Parameters:
context - The context object (param=0).options - The options object.
- Returns:
- A string result.
- Throws:
IOException - If a template cannot be loaded.
Copyright © 2012. All Rights Reserved.