Class: RRT_RUBY::RRTComponent::Component
- Inherits:
-
RRT_RUBY::RRTGeneric::Element
- Object
- RRT_RUBY::RRTGeneric::Element
- RRT_RUBY::RRTComponent::Component
- Defined in:
- lib/rrt_ruby/rrt_component.rb
Overview
Represents an RRT Component
Direct Known Subclasses
Instance Attribute Summary collapse
-
#package ⇒ Object
readonly
Returns the value of attribute package.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from RRT_RUBY::RRTGeneric::Element
#documentation, #name, #qualifiedname, #stereotype
Instance Method Summary collapse
-
#initialize(element) ⇒ Component
constructor
A new instance of Component.
- #to_s ⇒ Object
Constructor Details
#initialize(element) ⇒ Component
Returns a new instance of Component.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rrt_ruby/rrt_component.rb', line 14 def initialize element begin super(element) @type=element.Type @platform=element.Platform @package=element.ParentComponentPackage.GetQualifiedName rescue raise RRTGeneric::ElementException.new(element),"error while initialising element: #{$!}" end end |
Instance Attribute Details
#package ⇒ Object (readonly)
Returns the value of attribute package.
13 14 15 |
# File 'lib/rrt_ruby/rrt_component.rb', line 13 def package @package end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
13 14 15 |
# File 'lib/rrt_ruby/rrt_component.rb', line 13 def platform @platform end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
13 14 15 |
# File 'lib/rrt_ruby/rrt_component.rb', line 13 def type @type end |
Instance Method Details
#to_s ⇒ Object
24 25 26 |
# File 'lib/rrt_ruby/rrt_component.rb', line 24 def to_s super()+", #{@type}/#{@platform}." end |