Class: Siren::Observer
- Inherits:
-
Object
- Object
- Siren::Observer
- Defined in:
- lib/siren/observer.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Observer
constructor
A new instance of Observer.
- #update(*args) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Observer
Returns a new instance of Observer.
4 5 6 |
# File 'lib/siren/observer.rb', line 4 def initialize(&block) @block = block end |
Instance Method Details
#update(*args) ⇒ Object
8 9 10 |
# File 'lib/siren/observer.rb', line 8 def update(*args) @block.call(*args) end |