Module: Roby::Planning::MethodInheritance
- Included in:
- MethodDefinition, MethodModel
- Defined in:
- lib/roby/planning/model.rb
Overview
This mixin defines the method inheritance validation method. This is then used by MethodDefinition and MethodModel
Instance Method Summary collapse
-
#validate(options) ⇒ Object
Checks that options in
optionscan be used to overloadself.
Instance Method Details
#validate(options) ⇒ Object
Checks that options in options can be used to overload self. Updates options if needed
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/roby/planning/model.rb', line 87 def validate() if returns if [:returns] && !([:returns] <= returns) raise ArgumentError, "return task type #{[:returns]} forbidden since it overloads #{returns}" else [:returns] ||= returns end end if self..has_key?(:reuse) if .has_key?(:reuse) && [:reuse] != self.[:reuse] raise ArgumentError, "the :reuse option is already set on the #{name} model" end [:reuse] = self.[:reuse] else [:reuse] = true unless .has_key?(:reuse) end end |