Last active
August 29, 2015 14:03
-
-
Save squarepegsys/2389ac43663d10125020 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.text.SimpleTemplateEngine | |
def text = '${firstName} ${lastName} is a member of the ${lodge}' | |
def binding = [firstName: "Fred", lastName: "Flintstone", lodge:"Water Buffaloes"] | |
def engine = new SimpleTemplateEngine() | |
template = engine.createTemplate(text).make(binding) | |
assert template.toString()=="Fred Flintstone is a member of the Water Buffaloes" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment