Skip to content

Instantly share code, notes, and snippets.

@chirino
Created April 22, 2010 15:29
Show Gist options
  • Save chirino/375376 to your computer and use it in GitHub Desktop.
Save chirino/375376 to your computer and use it in GitHub Desktop.
class $(selector:String) {
var content = ""
def apply(value:String):String = {
"["+value+"] "+content
}
def $(selector:String) = {
content += " [selector "+selector+"] "
}
}
val transform = new $("ul") {
content = "test"
$("li")
}
transform("hello")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment