Method: Concurrent::Concern::Observable#add_observer
- Defined in:
- lib/concurrent-ruby/concurrent/concern/observable.rb
#add_observer(observer = nil, func = :update, &block) ⇒ Object
Adds an observer to this set. If a block is passed, the observer will be created by this method and no other params should be passed.
61 62 63 |
# File 'lib/concurrent-ruby/concurrent/concern/observable.rb', line 61 def add_observer(observer = nil, func = :update, &block) observers.add_observer(observer, func, &block) end |