Class: Substation::Observer::Chain

Inherits:
Substation::Observer show all
Defined in:
lib/substation/observer.rb

Overview

Chain of observers

Constant Summary

Constants inherited from Substation::Observer

NULL

Instance Method Summary collapse

Methods inherited from Substation::Observer

coerce

Instance Method Details

#call(response) ⇒ self

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Notify the observer

Parameters:

  • response (Response)

    the response returned when calling the observed action

Returns:

  • (self)


57
58
59
60
61
62
# File 'lib/substation/observer.rb', line 57

def call(response)
  observers.each do |observer|
    observer.call(response)
  end
  self
end