Now superseded by Wisper: https://github.com/krisleech/wisper
A transparent Sub / Pub broker for sending messages between objects
gem 'detachment'
class MyResponder
include Detachment
subscribe(:foo)
def foo(name)
raise "#{__callee__} message received with #{name}"
end
end
class MyPublisher
include Detachment
def execute
publish(:foo, 'bar')
end
end
MyPublisher.new.execute # => RuntimeError 'foo message received with bar'
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request