Hi,
In the following Groovy code snipped to add a fileAsString method to the String class, could someone explain what exactly 'this' refers to. I thought it was the object on which the fileAsString method is invoked, but apparently that's actually what delegate refers to.
String.metaClass.fileAsString = {
this.class.getResourceAsStream(delegate).getText()
}
Thanks, Don