Skip to content

Instantly share code, notes, and snippets.

@int128
Created March 22, 2016 11:11
Show Gist options
  • Save int128/53dd6e8b2a081b37b71e to your computer and use it in GitHub Desktop.
Save int128/53dd6e8b2a081b37b71e to your computer and use it in GitHub Desktop.
Settings with @DeleGate
class A {
def foo
}
class B {
def foo
}
class C {
@Delegate A a = new A()
@Delegate B b = new B()
}
def c = new C(foo: 100)
println c.foo
println c.a.foo
println c.b.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment