Created
January 13, 2012 09:17
-
-
Save osima/1605254 to your computer and use it in GitHub Desktop.
MarkupBuilderの記述で共通部分をまとめる
This file contains 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.xml.MarkupBuilder | |
import groovy.xml.MarkupBuilderHelper | |
def builder = new MarkupBuilder() | |
builder.root() { | |
eps() { | |
src('foo/1.eps') | |
} | |
textframe() { | |
eps(){ | |
src('foo/1.eps') | |
} | |
} | |
} |
This file contains 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.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