Class: PureMVC::Mediator
- Defined in:
- src/patterns/mediator/mediator.rb
Overview
A base IMediator
implementation.
Constant Summary collapse
- NAME =
The name of the
Mediator
.Typically, a
Mediator
will be written to serve one specific control or group controls and so, will not have a need to be dynamically named. 'Mediator'
Constants inherited from Notifier
Instance Attribute Summary collapse
-
#component ⇒ Object?
The component associated with this Mediator.
-
#name ⇒ String
readonly
The name of the Mediator.
Attributes inherited from Notifier
Instance Method Summary collapse
-
#handle_notification(notification) ⇒ Object
Handles a notification.
-
#initialize(name = nil, component = nil) ⇒ Mediator
constructor
Initializes a new Mediator instance.
-
#list_notification_interests ⇒ Array<String>
Returns an array of notification names this mediator is interested in.
-
#on_register ⇒ Object
Called when the mediator is registered.
-
#on_remove ⇒ Object
Called when the mediator is removed.
Methods inherited from Notifier
#facade, #initialize_notifier, #send_notification
Constructor Details
Instance Attribute Details
#component ⇒ Object?
Returns The component associated with this Mediator.
26 27 28 |
# File 'src/patterns/mediator/mediator.rb', line 26 def component @component end |
#name ⇒ String (readonly)
Returns The name of the Mediator.
23 24 25 |
# File 'src/patterns/mediator/mediator.rb', line 23 def name @name end |
Instance Method Details
#handle_notification(notification) ⇒ Object
Handles a notification.
48 |
# File 'src/patterns/mediator/mediator.rb', line 48 def handle_notification(notification); end |
#list_notification_interests ⇒ Array<String>
Returns an array of notification names this mediator is interested in.
41 42 43 |
# File 'src/patterns/mediator/mediator.rb', line 41 def list_notification_interests [] end |
#on_register ⇒ Object
Called when the mediator is registered.
51 |
# File 'src/patterns/mediator/mediator.rb', line 51 def on_register; end |
#on_remove ⇒ Object
Called when the mediator is removed.
54 |
# File 'src/patterns/mediator/mediator.rb', line 54 def on_remove; end |