Module: THTP::Server::PubSub
- Included in:
- THTP::Server
- Defined in:
- lib/thtp/server/pub_sub.rb
Overview
A truly trivial pub/sub implementation for instrumentation. Note, NOT threadsafe; make sure all subscribers are added before publishing anything.
Instance Method Summary collapse
-
#subscribe(subscriber) ⇒ Object
Add listeners to be run in the order of subscription.
Instance Method Details
#subscribe(subscriber) ⇒ Object
Add listeners to be run in the order of subscription
7 8 9 |
# File 'lib/thtp/server/pub_sub.rb', line 7 def subscribe(subscriber) subscribers << subscriber end |