Permalink
Browse files

Closes #6

  • Loading branch information...
1 parent 47e4cf2 commit 4ba55ffd7fa673e43794a3c26298044726eb368d @raganwald committed May 7, 2012
Showing with 259 additions and 186 deletions.
  1. +13 −4 lib/YouAreDaChef.coffee
  2. +191 −181 lib/YouAreDaChef.js
  3. +55 −1 spec/YouAreDaChef.spec.coffee
@@ -1,7 +1,6 @@
_ = require 'underscore'
-_.defaults this,
- YouAreDaChef: (clazzes...) ->
+YouAreDaChef = (clazzes...) ->
advise = (verb, advice, namespace, pointcut_exprs) ->
_.each clazzes, (clazz) ->
@@ -125,6 +124,8 @@ _.defaults this,
namespace: (str) ->
@_namespace = str
combinator
+ for: (args...) ->
+ YouAreDaChef(args...)
}, (c) ->
_.each ['default', 'before', 'around', 'after', 'guard'], (verb) ->
c[verb] = (args...) ->
@@ -139,7 +140,15 @@ _.defaults this,
else throw "What do I do with #{args} for #{verb}?"
this
-@YouAreDaChef.inspect ?= (clazz) ->
- clazz.__YouAreDaChef
+_.defaults YouAreDaChef,
+ inspect: (clazz) ->
+ clazz.__YouAreDaChef
+
+ for: (args...) ->
+ YouAreDaChef(args...)
+
+_.defaults this, {YouAreDaChef}
+
+
this
Oops, something went wrong.

0 comments on commit 4ba55ff

Please sign in to comment.