Skip to content

Instantly share code, notes, and snippets.

@canonic-epicure
Created June 30, 2010 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save canonic-epicure/458297 to your computer and use it in GitHub Desktop.
Save canonic-epicure/458297 to your computer and use it in GitHub Desktop.
// require.paths.unshift('/us/local/lib/jsan');
require.paths.unshift('/home/nickolay/Playground/nodejs');
require('Task/Joose/NodeJS');
var sys = require('sys');
Joose.Module('SuperStuff', {
// the following library is available in the path unshifted above
require : [ 'faye' ],
body : function (m) {
Joose.Class('WillParam', {
// trait : JooseX.Class.SimpleConstructor,
// does : SuperStuff['MyFirstParamd']({ methodsMatching : /bob/ }),
// does : SuperStuff['MyFirstParamd']({ methodsMatching : /^.+\$(.+)\$(WOWZERS)$/ }),
has : {
things : { is : 'rw', init : 'someText' }
},
methods : {
bob : function (val) {
this.setThings(val);
}
}
})
}
})
use('SuperStuff', function () {
SuperStuff['myVar'] = new SuperStuff['WillParam']();
sys.puts(SuperStuff['myVar'].getThings());
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment