Class 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
    • Constructor Detail

      • LookupHelper

        public LookupHelper()
    • Method Detail

      • apply

        public CharSequence 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.