Permalink
Browse files

Add docs for `extend`

  • Loading branch information...
1 parent 9227e12 commit f7fbbe844675b2faed2901890868bfc5ef9818b3 @bkeepers bkeepers committed Oct 10, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 README.md
View
@@ -24,6 +24,8 @@ Define your factory, giving it a name and optionally a constructor function:
.sequence('id')
.sequence('name', function(i) { return 'player' + i; });
+ Factory.define('disabled-player').extend('player').attr('state', 'disabled')
+
Now you can build an object, passing in attributes that you want to override:
var game = Factory.build('game', {is_over:true});

0 comments on commit f7fbbe8

Please sign in to comment.