Class: Siren::Observer

Inherits:
Object
  • Object
show all
Defined in:
lib/siren/observer.rb

Instance Method Summary collapse

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