Monday, April 11, 2011

Groovy script v class

Apparently, a groovy file is either a script or a class file, not both (contrary to this example). If you try to do something like:
class Foo {
def bar
}

def baz = new Foo()

you'll get an error like:
Invalid duplicate class definition of class Foo


Further explanation here and here.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Jekyll Pages List

Getting a list of pages in a Jekyll site is easy, but paring that down to just the top-level files and the index pages is tricky. {% for p...