New builder syntax for Joose

malte on 2008-03-19T20:55:32

Joose now supports two new ways to create Joose.Classes

joosify(MyClass) now turns regular classes into Joose.Clases.

...and you can now use a more JavaScript like Syntax to build Joose.Classes:

Class("Currency", {
	does: Eq,
	has:  ["value", {is: rw}],
	methods: {
		initialize: function (value) {
			this.setValue(value)
		},
	
		isEqual: function (cur) {
			return this.getValue() == cur.getValue()
		}
	}
})


Very Nice

Stevan on 2008-03-20T00:12:04

Very nice, I like it. It feels both Javascripty and Moosey.

- Stevan