Module: Roby::TaskStructure::Conflicts::ModelExtension

Extended by:
MetaRuby::Attributes
Defined in:
lib/roby/task_structure/conflicts.rb

Instance Method Summary collapse

Instance Method Details

#conflicts_with(model) ⇒ Object



19
20
21
22
# File 'lib/roby/task_structure/conflicts.rb', line 19

def conflicts_with(model)
    conflicting_models << model
    model.conflicting_models << self
end

#conflicts_with?(model) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
27
28
29
# File 'lib/roby/task_structure/conflicts.rb', line 24

def conflicts_with?(model)
    each_conflicting_model do |m|
        return true if model <= m
    end
    false
end