-
-
Save chirino/2036056 to your computer and use it in GitHub Desktop.
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
Tuple3 { | |
inline def forEach(fn: Function<Any?,Unit>):Unit = { | |
fn.invoke(this._1) | |
fn.invoke(this._2) | |
fn.invoke(this._3) | |
} | |
} | |
StringTemplate3 : Tuple3 { | |
fun toString = { | |
val sb = StringBuilder(); | |
this.forEach{ sb.append(it) } | |
sb.toString | |
} | |
} | |
fun StringTemplate3.toHtml(options:Options) = { | |
val sb = HtmlBuilder(options); | |
this.forEach{ sb.append(it) } | |
sb.toString | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment