Package ratpack.groovy

Support for writing Ratpack applications in the Groovy programming language.

Key Features

The Groovy support provides the following key features:

Use of closures and DelegatesTo

Ratpack makes heavy use of a feature of Groovy 2.1 that allows the delegate of a closure to be specified via the type system. Namely, the DelegatesTo annotation. On all parts of the API where a Closure is being accepted as a method parameter, the parameter will be annotated with this annotation. This specifies the type of the closure delegate object during execution. For more information on closure delegates, see this article.

When reading the API reference, it's important to take note of the DelegatesTo annotation on closure parameters. This parameter indicates what type to look at for information on what the closure can do.