com.github.jknack.handlebars.helper
Class PrecompileHelper

java.lang.Object
  extended by com.github.jknack.handlebars.helper.PrecompileHelper
All Implemented Interfaces:
Helper<String>

public final class PrecompileHelper
extends Object
implements Helper<String>

Precompiled a template to JavaScript using handlebars.js.

Since:
0.6.0
Author:
edgar.espina

Field Summary
static Helper<String> INSTANCE
          The default and shared instance.
static String NAME
          The default helper's name.
 
Method Summary
 CharSequence apply(String path, 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

NAME

public static final String NAME
The default helper's name.

See Also:
Constant Field Values

INSTANCE

public static final Helper<String> INSTANCE
The default and shared instance.

Method Detail

apply

public CharSequence apply(String path,
                          Options options)
                   throws IOException
Description copied from interface: Helper
Callback method for execute the given method.

Specified by:
apply in interface Helper<String>
Parameters:
path - 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.