Constructor and Description |
---|
MustacheTemplate(org.springframework.restdocs.mustache.Template delegate)
Creates a new
MustacheTemplate that adapts the given delegate . |
MustacheTemplate(org.springframework.restdocs.mustache.Template delegate,
java.util.Map<java.lang.String,java.lang.Object> context)
Creates a new
MustacheTemplate that adapts the given delegate . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
render(java.util.Map<java.lang.String,java.lang.Object> context)
Renders the template to a
String using the given context for
variable/property resolution. |
public MustacheTemplate(org.springframework.restdocs.mustache.Template delegate)
MustacheTemplate
that adapts the given delegate
.delegate
- the delegate to adaptpublic MustacheTemplate(org.springframework.restdocs.mustache.Template delegate, java.util.Map<java.lang.String,java.lang.Object> context)
MustacheTemplate
that adapts the given delegate
.
During rendering, the given context
and the context passed into
render(Map)
will be combined and then passed to the delegate when it is
executed
.delegate
- the delegate to adaptcontext
- the contextpublic java.lang.String render(java.util.Map<java.lang.String,java.lang.Object> context)
Template
String
using the given context
for
variable/property resolution.