ff0000/rosy — pull request #76 by timrwood (2012-11-28 23:13:37+00:00)
Title: Adding model class to Rosy

This adds a backbonesque model class to Rosy.

Setters
```javascript
var model = new Model();

// key value setters
model.set('firstname', 'tim');
model.set('lastname', 'wood');

// object setters
model.set({
age: 26,
avatar: "/uploads/timrwood.png"
});

// creating model with defaults
var other = new Model({
firstname: "danny",
lastname: "garc"
});
other.get('firstname'); // danny
```

Getters
```javascript
// getters by key
model.get('firstname'); // tim
model.get('age'); // 26

// getting keys
model.keys(); // ['firstname', 'lastname', 'age', 'avatar']

// getting all values
model.get();
/*
{
firstname: "tim",
lastname: "wood",
age: 26,
avatar: "/uploads/timrwood.png"
}
*/
```

Events
```javascript
// events
model.on("change", function(){
console.log('changed some value');
}
model.on("change:firstname", function() {
console.log("changed name to " + model.get('firstname'));
}
model.set('age', 45);
// "changed some value"
model.set('firstname', 'tiger');
// "changed some value"
// "changed name to tiger"
```