Permalink
Browse files

Add `use` docs.

  • Loading branch information...
1 parent ff26777 commit 24e8ccaa80922b19d71b433d8d2b49377c7954ed @benpickles committed Apr 7, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 docs/class_properties.md
View
@@ -282,3 +282,15 @@ Returns the collection sorted by either an attribute or a custom function.
return this.attr("name").length
}).all()
// => [egg, ham, cheese]
+
+#### `use(Plugin, ...)`
+
+Applies a plugin to the class.
+
+ Project = Model("project", function() {
+ this.use(MyPlugin, "with", { extra: "arguments" })
+ })
+
+`use` can also be called outside of a model's declaration as it's simply a class method.
+
+ Project.use(MyPlugin, "with", { extra: "arguments" })

0 comments on commit 24e8cca

Please sign in to comment.