Skip to content

Instantly share code, notes, and snippets.

View andresteingress's full-sized avatar
🎯
Focusing

Andre Steingress andresteingress

🎯
Focusing
View GitHub Profile
@andresteingress
andresteingress / gist:5370086
Created April 12, 2013 07:06
Groovy Common Extensions not found in groovyConsole and scripts
@Grapes(Grab(group='com.bloidonia', module='groovy-common-extensions', version='0.4.1'))
def f = new File('test.zip')
f.unzip(new File('test'))
@Grab(group='org.gcontracts', module='gcontracts', version='[1.1.1,)')
import org.gcontracts.annotations.*
@Invariant({ elements != null })
class Stack {
private List elements
@Ensures({ is_empty() })
public Stack() {
@Grab(group='org.gcontracts', module='gcontracts', version='[1.1.0,)')
import org.gcontracts.annotations.Invariant
@Invariant({ firstName != null && lastName != null })
class Person {
String firstName
String lastName
def Person(final String firstName, final String lastName) {
this.firstName = firstName