More Metaprogramming
class Sample {
}
Sample.metaClass.static.blah = { -> println "this worked, too!" }
Sample.blah()
[bruce@kimura presentation]$ groovy test.groovy this worked, too!
String.metaClass.foo = { -> println "Hi ${delegate}" }
"Bruce".foo()
[bruce@kimura presentation]$ groovy test2.groovy Hi bruce