Class: RRT_RUBY::RRTLogical::Connector
- Inherits:
-
RRT_RUBY::RRTGeneric::Element
- Object
- RRT_RUBY::RRTGeneric::Element
- RRT_RUBY::RRTLogical::Connector
- Defined in:
- lib/rrt_ruby/rrt_logical.rb
Instance Attribute Summary collapse
-
#cardinality ⇒ Object
readonly
Returns the value of attribute cardinality.
-
#connects_to ⇒ Object
readonly
Returns the value of attribute connects_to.
Attributes inherited from RRT_RUBY::RRTGeneric::Element
#documentation, #name, #qualifiedname, #stereotype
Instance Method Summary collapse
-
#initialize(element) ⇒ Connector
constructor
A new instance of Connector.
- #to_s ⇒ Object
Constructor Details
#initialize(element) ⇒ Connector
Returns a new instance of Connector.
136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 136 def initialize element begin super(element) @connects_to=Array.new #this gets name of the capsule containing the port this connector connects to. #with this configuration the Connector is only to be used as a member of a capsule (so this defines one end of the connection and the parent object defines the other end) @connects_to<<element.PortRole1.ParentCapsuleRole.Name if element.PortRole1 @connects_to<<element.PortRole2.ParentCapsuleRole.Name if element.PortRole2 @cardinality=element.Cardinality rescue raise RRTGeneric::ElementException.new(element),"error while initialising element:#{$!}" end end |
Instance Attribute Details
#cardinality ⇒ Object (readonly)
Returns the value of attribute cardinality.
135 136 137 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 135 def cardinality @cardinality end |
#connects_to ⇒ Object (readonly)
Returns the value of attribute connects_to.
135 136 137 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 135 def connects_to @connects_to end |
Instance Method Details
#to_s ⇒ Object
150 151 152 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 150 def to_s super() end |