static { try { handlebars.registerHelper( "compare", new Helper<Object>() { @Override public CharSequence apply(Object context, Options options) throws IOException { if (options.params[0].equals(context == "last")) { return options.fn(); } else { return options.inverse(); } } }); template = handlebars.compile("/com/fantasy/system/job/dicts"); } catch (IOException e) { LOGGER.error(e.getMessage(), e); } }
@Override protected void configure(final Handlebars handlebars) { handlebars.registerHelper("dateFormat", StringHelpers.dateFormat); }