Class CaseFormatLambda

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

    public class CaseFormatLambda
    extends Object
    implements com.samskivert.mustache.Mustache.Lambda
    Converts text from CaseFormat to another CaseFormat Register:
     additionalProperties.put("convert", new CaseFormatLambda(LOWER_CAMEL, UPPER_UNDERSCORE));
     
    Use:
     {{#convert}}{{name}}{{/convert}}
     
    • Constructor Detail

      • CaseFormatLambda

        public CaseFormatLambda​(com.google.common.base.CaseFormat target,
                                com.google.common.base.CaseFormat targetFormat)
    • 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