module Spine::Hub::Subscriber
Public Instance Methods
notify(event, *arguments)
click to toggle source
Notifies subscriber about event. It delegates processing that event to on_<event> method with specified arguments.
Attributes¶ ↑
-
event
- Name of event. -
arguments
- Arguments for event.
# File lib/spine/hub/subscriber.rb, line 10 def notify(event, *arguments) method_name = "on_#{ event }".to_sym send(method_name, *arguments) if respond_to?(method_name) end