Class: Scheduler::MessageTask
- Defined in:
- scripts/00700 Ajout_PSDK/00100 Scheduler.rb
Overview
Describe a Task that send a message to a specific object
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Name that describe the task.
-
#priority ⇒ Integer
readonly
Priority of the task.
Instance Method Summary collapse
-
#initialize(name, priority, object, message) ⇒ MessageTask
constructor
Initialize a MessageTask with its name, priority, the object and the message to send.
-
#start
Send the message to the object.
Constructor Details
#initialize(name, priority, object, message) ⇒ MessageTask
Initialize a MessageTask with its name, priority, the object and the message to send
135 136 137 138 139 140 |
# File 'scripts/00700 Ajout_PSDK/00100 Scheduler.rb', line 135 def initialize(name, priority, object, ) @name = name @priority = -priority @object = object @message = end |
Instance Attribute Details
#name ⇒ String (readonly)
Name that describe the task
129 130 131 |
# File 'scripts/00700 Ajout_PSDK/00100 Scheduler.rb', line 129 def name @name end |
#priority ⇒ Integer (readonly)
Priority of the task
126 127 128 |
# File 'scripts/00700 Ajout_PSDK/00100 Scheduler.rb', line 126 def priority @priority end |
Instance Method Details
#start
Send the message to the object
143 144 145 |
# File 'scripts/00700 Ajout_PSDK/00100 Scheduler.rb', line 143 def start @object.send(*@message) end |