|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.jknack.handlebars.helper.WithHelper
public class WithHelper
Normally, Handlebars templates are evaluated against the context passed into the compiled method.
You can shift the context for a section of a template by using the built-in with block helper.
| Field Summary | |
|---|---|
static Helper<Object> |
INSTANCE
A singleton instance of this helper. |
static String |
NAME
The helper's name. |
| Constructor Summary | |
|---|---|
WithHelper()
|
|
| Method Summary | |
|---|---|
CharSequence |
apply(Object context,
Options options)
Callback method for execute the given method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Helper<Object> INSTANCE
public static final String NAME
| Constructor Detail |
|---|
public WithHelper()
| Method Detail |
|---|
public CharSequence apply(Object context,
Options options)
throws IOException
Helper
apply in interface Helper<Object>context - The context object (param=0).options - The options object.
IOException - If a template cannot be loaded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||