Skip to content

Instantly share code, notes, and snippets.

@osima
Created January 13, 2012 09:17
Show Gist options
  • Save osima/1605254 to your computer and use it in GitHub Desktop.
Save osima/1605254 to your computer and use it in GitHub Desktop.
MarkupBuilderの記述で共通部分をまとめる
import groovy.xml.MarkupBuilder
import groovy.xml.MarkupBuilderHelper
def builder = new MarkupBuilder()
builder.root() {
eps() {
src('foo/1.eps')
}
textframe() {
eps(){
src('foo/1.eps')
}
}
}
import groovy.xml.MarkupBuilder
import groovy.xml.MarkupBuilderHelper
def builder = new MarkupBuilder()
builder.root() {
def epsEle = { eps(){ src('foo/1.eps') } }
epsEle()
textframe(){
epsEle()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment