Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ded/klass
Browse files Browse the repository at this point in the history
  • Loading branch information
fat committed Apr 6, 2011
2 parents 98da560 + 9fbef6d commit 005c836
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Expand Up @@ -35,31 +35,28 @@ Interface
new SuperHuman('Zelda').walk()

<h3>Object Literals...</h3>
(because sometimes you want to use little curlies ;)

var Foo = klass({
because sometimes you want to use little curlies ;)

var Foo = klass({
foo: 0,

initialize: function() {
this.foo = 1;
},

getFoo: function () {
return this.foo;
},

setFoo: function (x) {
this.foo = x;
return this.getFoo();
}

});

*note: initialize will be called on class invocation*

<h3>Implementing...</h3>
(because sometimes you want to overwrite OR mixin an instance method)

because sometimes you want to overwrite OR mixin an instance method

// note you can optionally pass an object literal to extend too ;)
var Alien = SuperHuman.extend({
Expand Down

0 comments on commit 005c836

Please sign in to comment.