Class ReplaceAllLambda

  • All Implemented Interfaces:
    com.samskivert.mustache.Mustache.Lambda

    public class ReplaceAllLambda
    extends Object
    implements com.samskivert.mustache.Mustache.Lambda
    Replaces all regex captures with the provided string.

    Register:

     additionalProperties.put("regex", new ReplaceAllLambda());
     

    Use:

     {{#regex}}{{summary}}{{/regex}}
     
    • Constructor Detail

      • ReplaceAllLambda

        public ReplaceAllLambda​(String regex,
                                String replacement)
    • Method Detail

      • execute

        public void execute​(com.samskivert.mustache.Template.Fragment fragment,
                            Writer writer)
                     throws IOException
        Specified by:
        execute in interface com.samskivert.mustache.Mustache.Lambda
        Throws:
        IOException