Created
August 24, 2010 08:07
-
-
Save michaelsbradleyjr/547167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joose.Class('Class1', { | |
use : [ 'Class2' ], | |
has : { | |
myAttr : { | |
is : 'rw', | |
lazy : function () { return new Class2({ passed : this.getPassThis() }) } | |
}, | |
passThis : { | |
is : 'rw', | |
init : null | |
} | |
}, | |
methods : { | |
initialize : function () { | |
this.getMyAttr() | |
} | |
} | |
}) | |
Joose.Class('Class2', { | |
has : { | |
passed : { | |
is : 'rw', | |
init : null | |
} | |
} | |
}) | |
var myInstance = new Class1({ passThis : 'someValue' }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment