class SampleGriffonAddon {
def methods = [
compute: { x -> x + x }
]
}
methods
property is responible for adding new methods to builders. Each method is defined as a key (the name of the method) and a closure (the implementation of the method).