Class: PureMVC::SimpleCommand

Inherits:
Notifier
  • Object
show all
Defined in:
src/patterns/command/simple_command.rb

Overview

A base ICommandimplementation.

Subclasses should override the executemethod, where business logic will handle the INotification.

Constant Summary

Constants inherited from Notifier

Notifier::MULTITON_MSG

Instance Attribute Summary

Attributes inherited from Notifier

#multiton_key

Instance Method Summary collapse

Methods inherited from Notifier

#facade, #initialize_notifier, #send_notification

Instance Method Details

#execute(notification) ⇒ Object

Fulfill the use-case initiated by the given INotification.

In the Command Pattern, an application use-case typically begins with some user action, which results in an INotificationbeing broadcast, handled by business logic in the executemethod of an ICommand.

Parameters:

  • notification (_INotification)

    the notification to handle



26
# File 'src/patterns/command/simple_command.rb', line 26

def execute(notification); end