Exception: Syskit::AmbiguousIndirectCompositionSelection
Overview
Exception raised during instanciation if there is an ambiguity for a composition child
Instance Attribute Summary collapse
-
#candidates ⇒ Object
readonly
Returns the value of attribute candidates.
-
#child_name ⇒ Object
readonly
Returns the value of attribute child_name.
-
#composition_model ⇒ Object
readonly
Returns the value of attribute composition_model.
-
#selection ⇒ Object
readonly
Returns the value of attribute selection.
Instance Method Summary collapse
-
#initialize(composition_model, child_name, selection, candidates) ⇒ AmbiguousIndirectCompositionSelection
constructor
A new instance of AmbiguousIndirectCompositionSelection.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(composition_model, child_name, selection, candidates) ⇒ AmbiguousIndirectCompositionSelection
Returns a new instance of AmbiguousIndirectCompositionSelection
91 92 93 94 95 96 |
# File 'lib/syskit/exceptions.rb', line 91 def initialize(composition_model, child_name, selection, candidates) @composition_model = composition_model @child_name = child_name @selection = selection @candidates = candidates end |
Instance Attribute Details
#candidates ⇒ Object (readonly)
Returns the value of attribute candidates
89 90 91 |
# File 'lib/syskit/exceptions.rb', line 89 def candidates @candidates end |
#child_name ⇒ Object (readonly)
Returns the value of attribute child_name
87 88 89 |
# File 'lib/syskit/exceptions.rb', line 87 def child_name @child_name end |
#composition_model ⇒ Object (readonly)
Returns the value of attribute composition_model
86 87 88 |
# File 'lib/syskit/exceptions.rb', line 86 def composition_model @composition_model end |
#selection ⇒ Object (readonly)
Returns the value of attribute selection
88 89 90 |
# File 'lib/syskit/exceptions.rb', line 88 def selection @selection end |
Instance Method Details
#pretty_print(pp) ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/syskit/exceptions.rb', line 98 def pretty_print(pp) pp.text "ambiguity while searching for compositions for the child #{child_name} of #{composition_model.short_name}" pp.breakable pp.text "selection is:" pp.nest(2) do pp.breakable pp.seplist(selection) do |keyvalue| name, model = keyvalue pp.text "#{name} => #{model.short_name}" end end pp.breakable pp.text "which corresponds to the following compositions:" pp.nest(2) do pp.breakable pp.seplist(candidates) do |model| pp.text "#{model.short_name}" end end end |