Class: Roby::GoalVariableModel
- Inherits:
-
OpenStructModel::Variable
- Object
- OpenStructModel::Variable
- Roby::GoalVariableModel
- Defined in:
- lib/roby/state/goal_model.rb
Overview
Representation of a state variable in the goal structure
Instance Attribute Summary collapse
-
#reader ⇒ Object
Accessor object.
Attributes inherited from OpenStructModel::Variable
Instance Method Summary collapse
Methods inherited from OpenStructModel::Variable
Constructor Details
This class inherits a constructor from Roby::OpenStructModel::Variable
Instance Attribute Details
#reader ⇒ Object
Accessor object. It must respond to #call(task) and return the state variable. Note that if the associated state model defines a type, the return value must be of this type
19 20 21 |
# File 'lib/roby/state/goal_model.rb', line 19 def reader @reader end |
Instance Method Details
#call(task) ⇒ Object
28 29 30 |
# File 'lib/roby/state/goal_model.rb', line 28 def call(task) reader.call(task) end |
#to_goal_variable_model(field, name) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/roby/state/goal_model.rb', line 21 def to_goal_variable_model(field, name) result = dup result.field = field result.name = name result end |