Skip to content

krisleech/detachment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Now superseded by Wisper: https://github.com/krisleech/wisper

Detachment

A transparent Sub / Pub broker for sending messages between objects

Installation

gem 'detachment'

Usage

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'

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Transparent Sub / Pub broker for Ruby objects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages