public class IndentedLambda extends Object implements com.github.jknack.handlebars.Lambda
Generator authors may add helpers for explicitly adding prefixed spaces which fragments won't be aware of.
Register:
additionalProperties.put("indent4", new IndentedLambda(4));
additionalProperties.put("indent8", new IndentedLambda(8));
Use:
{{#indent4}}{{>template}}{{/indent4}}
{{#indent8}}{{>other_template}}{{/indent8}}
| Constructor and Description |
|---|
IndentedLambda()
Constructs a new instance of
io.swagger.codegen.mustache.IndentedLambda, with an indent count of 4 spaces |
IndentedLambda(int prefixSpaceCount,
String indentionCharacter)
Constructs a new instance of
io.swagger.codegen.mustache.IndentedLambda, with customized indent count and intention character |
| Modifier and Type | Method and Description |
|---|---|
Object |
apply(Object o,
com.github.jknack.handlebars.Template template) |
public IndentedLambda()
io.swagger.codegen.mustache.IndentedLambda, with an indent count of 4 spacespublic IndentedLambda(int prefixSpaceCount,
String indentionCharacter)
io.swagger.codegen.mustache.IndentedLambda, with customized indent count and intention characterprefixSpaceCount - The number of indented characters to apply as a prefix to a fragment.indentionCharacter - String representation of the character used in the indent (e.g. " ", "\t", ".").public Object apply(Object o, com.github.jknack.handlebars.Template template) throws IOException
apply in interface com.github.jknack.handlebars.LambdaIOExceptionCopyright © 2022. All rights reserved.