geekq/workflow — pull request #53 by dwbutler (2012-08-27 14:55:49+00:00)
Title: Support for private callbacks

I defined some callbacks on my model. The problem is that the methods look like the public API, and will cause confusion and bugs when users of the API call the callback methods directly instead of the workflow methods.

(For example, it would be easy to mistakenly call task.assign instead of task.assign!)

My first instinct was to make the callback methods private, but this didn't work. Digging deeper, I found out this is because workflow doesn't look for private callbacks. This patch helps workflow find private callbacks.