Skip to content

Instantly share code, notes, and snippets.

View canonic-epicure's full-sized avatar
💭
Well-typed API for the world

Nickolay Platonov canonic-epicure

💭
Well-typed API for the world
View GitHub Profile
Role('JooseX.Attribute.Delegated', {
have : {
handles : null
},
override : {
getAccessorsFor : function (targetClass) {
// sudden fail:
var a = instance.method()
(function() {
})()
eq
Role('Some.Trait', {
builder : {
methods : {
newBuilder : function (meta, info) {
meta.addProperty(...)
}
}
var Script = process.binding('evals').Script
var sys = require('sys')
var puts = sys.puts
var runner = function (code) { return eval(code) }
var sandbox = {}
sandbox.me = sandbox
Class('Some.Another.Module', {
use : ['Some.Joose.Module']
})
require.paths.unshift('/home/nickolay/Playground/nodejs');
require('Task/Joose/NodeJS');
var sys = require('sys');
Joose.Module('SuperStuff', {
require : [ 'faye'],
use : [ 'Task/JooseX/Class/SimpleConstructor/Core', 'Task/JooseX/Role/Parameterized/Core', 'JooseX/Class/Singleton' ],
// 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.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
Class('Class.With.Decorated.Methods', {
trait : JooseX.Class.MethodLabels,
methods : {
method1 : function () {
...
Role('Method.Feature.Decorated')
Class('Method.Special', {
meta : JooseX.Meta.Class,
isa : Joose.Managed.Property.MethodModifier.Put,
does : Method.Feature.Decorated
})