BBC-News/alephant — pull request #46 by stevenjack (2014-06-05 12:48:32+00:00)
Title: Adds around functionality

This PR adds the method `around` to the module `Alephant::AOP`

![fetch_fail](https://cloud.githubusercontent.com/assets/527874/3186479/eaf28f5a-eca2-11e3-8a5d-c1cc808e5c4b.gif)

The purpose of this is to allow consumers of the alephant framework to hook in before and after a method call on classes that extend `Alephant::AOP`.

For example:

```ruby
require 'alephant'

Alephant::Publisher.around('process') do | state, args |
if state == :before
puts "I'm doing something before"
elsif state == :after
puts "I'm doing something after"
end
end

publisher = Alephant::Publisher.create({})

publisher.process(msg)
```