shaoyanmin/my_mongoid — pull request #3 by allenfantasy (2014-03-03 03:21:02+00:00)
Title: Practicing ActiveSupport::Callbacks

Implementation of callbacks in ATM.

我用了和Howard稍微不同的实现方式，定义的类宏用法是这样的：

```ruby
class ATM
command_before :deposit, :log
command_after :deposit, :send_sms
command_around :deposit, ->(r, &block) { log("before log"); block.call; log("after log") }
end
```