Class: Roby::DelayedArgumentFromState
- Inherits:
-
DelayedArgumentFromObject
- Object
- DelayedArgumentFromObject
- Roby::DelayedArgumentFromState
- Defined in:
- lib/roby/task_arguments.rb
Overview
Placeholder that can be used to assign an argument from a state value, reading the attribute only when the task is started
This will usually not be used directly. One should use Task.from_state instead
It differs from DelayedArgumentFromObject as it always filters out unassigned state values
Instance Method Summary collapse
- #evaluate_delayed_argument(task) ⇒ Object
-
#initialize(state_object = State, weak = true) ⇒ DelayedArgumentFromState
constructor
A new instance of DelayedArgumentFromState.
Methods inherited from DelayedArgumentFromObject
#==, #method_missing, #of_type, #pretty_print, #to_s
Methods included from Roby::DRoby::V5::Builtins::ClassDumper
Methods included from Roby::DRoby::V5::DelayedArgumentFromObjectDumper
Constructor Details
#initialize(state_object = State, weak = true) ⇒ DelayedArgumentFromState
Returns a new instance of DelayedArgumentFromState.
367 368 369 |
# File 'lib/roby/task_arguments.rb', line 367 def initialize(state_object = State, weak = true) super(state_object, weak) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Roby::DelayedArgumentFromObject
Instance Method Details
#evaluate_delayed_argument(task) ⇒ Object
371 372 373 374 375 376 377 |
# File 'lib/roby/task_arguments.rb', line 371 def evaluate_delayed_argument(task) result = super if result.kind_of?(OpenStruct) && !result.attached? throw :no_value end result end |