Class LookupHelper

java.lang.Object
com.github.jknack.handlebars.helper.LookupHelper
All Implemented Interfaces:
Helper<Object>

public class LookupHelper extends Object implements Helper<Object>
Lookup helper, which allows to get a context variable. It was introduced with dynamic partials:
 {{> (lookup '.' 'myVariable') }}
 
Since:
2.2.0
  • Field Details

  • Constructor Details

    • LookupHelper

      public LookupHelper()
  • Method Details

    • apply

      public Object apply(Object context, Options options) throws IOException
      Description copied from interface: Helper
      Apply the helper to the context.
      Specified by:
      apply in interface Helper<Object>
      Parameters:
      context - The context object.
      options - The options object.
      Returns:
      A string result.
      Throws:
      IOException - If a template cannot be loaded.