Class: Brainguy::BasicNotifier

Inherits:
Object
  • Object
show all
Defined in:
lib/brainguy/basic_notifier.rb

Overview

A notifier encapsulates various strategies for notifying subscriptions of events. This is the most basic form of notifier. It just passes the event on with no extra logic.

Direct Known Subclasses

ErrorHandlingNotifier

Instance Method Summary collapse

Instance Method Details

#notify(subscription, event) ⇒ Object

Notify a subscription of an event

Returns:

  • whatever the listener returns



9
10
11
# File 'lib/brainguy/basic_notifier.rb', line 9

def notify(subscription, event)
  subscription.handle(event)
end

#resultObject

Some notifiers have interesting results. This one just returns nil.

Returns:

  • nil



15
16
17
# File 'lib/brainguy/basic_notifier.rb', line 15

def result
  nil
end