npm install Brocket
or for a global install
npm install -g Brocket
Under the hood, Brocket is based on a powerful meta-model. Every aspect of Brocket is itself a class, providing powerful introspectiona nd extension features.
Brocket is a port of Perl's Moose.
This is an early version of Brocket. A lot of it isn't done. In particular, it is not yet self-bootstrapping, so you cannot extend Brocket by using Brocket-based classes (this will be coming in the future), and it does not provide any code generation features to make things faster.
In other words, it's incomplete and slow.
Creating a class with Brocket:
Brocket = ;Person = Brocket;User = Brocket;bob =firstName: "Bob"lastName: "Smith"username: "bob.smith"password: "password";bobif bob...
Here's a class example in CoffeeScript
Brocket = require "Brocket"Person = BrocketmakeClass "Person"Bhas "firstName"access: "ro"Bhas "lastName"access: "ro"Bhas "age"access: "ro"default: 0Bmethod "greet"->consolelog "Hi, my name is ."