Class IndentedLambda
java.lang.Object
io.swagger.codegen.v3.generators.handlebars.lambda.IndentedLambda
- All Implemented Interfaces:
com.github.jknack.handlebars.Lambda
This naively prepends indention to all lines of a fragment.
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 Summary
ConstructorsConstructorDescriptionConstructs a new instance ofIndentedLambda, with an indent count of 4 spacesIndentedLambda(int prefixSpaceCount, String indentionCharacter) Constructs a new instance ofIndentedLambda, with customized indent count and intention character -
Method Summary
-
Constructor Details
-
IndentedLambda
public IndentedLambda()Constructs a new instance ofIndentedLambda, with an indent count of 4 spaces -
IndentedLambda
Constructs a new instance ofIndentedLambda, with customized indent count and intention character- Parameters:
prefixSpaceCount- 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", ".").
-
-
Method Details
-
apply
- Specified by:
applyin interfacecom.github.jknack.handlebars.Lambda- Throws:
IOException
-