Class: Roby::DelayedArgument
Overview
Documentation of the delayed argument interface
This is not meant to be used directly
Instance Method Summary collapse
-
#can_merge?(task, other_task, other_arg) ⇒ Boolean
Tests the possibility to merge this with another delayed argument.
-
#evaluate_delayed_argument(task) ⇒ Object
Evaluate this delayed argument in the context of the given task.
-
#merge(task, other_task, other_arg) ⇒ Object
Merge this argument with another.
-
#pretty_print(pp) ⇒ Object
Pretty-print this delayed argument.
-
#strong? ⇒ Boolean
Whether the argument represents a default (weak) or a real value (strong).
Instance Method Details
#can_merge?(task, other_task, other_arg) ⇒ Boolean
Tests the possibility to merge this with another delayed argument
This tests whether this arguemnt, in the context of task, could be merged with another argument when evaluated in the context of another task
500 501 502 |
# File 'lib/roby/task_arguments.rb', line 500 def can_merge?(task, other_task, other_arg) raise NotImplementedError end |
#evaluate_delayed_argument(task) ⇒ Object
Evaluate this delayed argument in the context of the given task
It should either return a plain object (which may be nil) or throw :no_value to indicate that it cannot be evaluated (yet)
491 492 493 |
# File 'lib/roby/task_arguments.rb', line 491 def evaluate_delayed_argument(task) raise NotImplementedError end |
#merge(task, other_task, other_arg) ⇒ Object
Merge this argument with another
The method may assume that #can_merge? has been called and returned true
511 512 513 |
# File 'lib/roby/task_arguments.rb', line 511 def merge(task, other_task, other_arg) raise NotImplementedError end |
#pretty_print(pp) ⇒ Object
Pretty-print this delayed argument
Roby uses the pretty-print mechanism to build most of its error messages, so it is better to implement the #pretty_print method for custom delayed arguments
485 |
# File 'lib/roby/task_arguments.rb', line 485 def pretty_print(pp); end |
#strong? ⇒ Boolean
Whether the argument represents a default (weak) or a real value (strong)
Strong arguments automatically override weak ones during merge
518 519 520 |
# File 'lib/roby/task_arguments.rb', line 518 def strong? raise NotImplementedError end |