Class: RRT_RUBY::RRTGeneric::Element
- Inherits:
-
Object
- Object
- RRT_RUBY::RRTGeneric::Element
- Defined in:
- lib/rrt_ruby/rrt_generic.rb
Overview
This is the base class for all model elements. It corresponds to RRTEI::ModelElement
Direct Known Subclasses
RRT_RUBY::RRTComponent::Component, RRT_RUBY::RRTDeployment::Instance, RRT_RUBY::RRTDeployment::Processor, RRT_RUBY::RRTLogical::Attribute, RRT_RUBY::RRTLogical::Capsule, RRT_RUBY::RRTLogical::Class, RRT_RUBY::RRTLogical::Connector, RRT_RUBY::RRTLogical::LogicalPackage, RRT_RUBY::RRTLogical::Protocol, RRT_RUBY::RRTLogical::Role
Instance Attribute Summary collapse
-
#documentation ⇒ Object
readonly
Returns the value of attribute documentation.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#qualifiedname ⇒ Object
readonly
Returns the value of attribute qualifiedname.
-
#stereotype ⇒ Object
readonly
Returns the value of attribute stereotype.
Instance Method Summary collapse
-
#initialize(element) ⇒ Element
constructor
element is the OLE Object of a RRTEI::ModelElement or derived class.
- #to_s ⇒ Object
Constructor Details
#initialize(element) ⇒ Element
element is the OLE Object of a RRTEI::ModelElement or derived class
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rrt_ruby/rrt_generic.rb', line 22 def initialize element begin @name=element.Name @qualifiedname=element.GetQualifiedName @stereotype=element.Stereotype @documentation=element.Documentation rescue raise ElementException.new(element),"error while initialising element: #{$!}" end end |
Instance Attribute Details
#documentation ⇒ Object (readonly)
Returns the value of attribute documentation.
20 21 22 |
# File 'lib/rrt_ruby/rrt_generic.rb', line 20 def documentation @documentation end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/rrt_ruby/rrt_generic.rb', line 20 def name @name end |
#qualifiedname ⇒ Object (readonly)
Returns the value of attribute qualifiedname.
20 21 22 |
# File 'lib/rrt_ruby/rrt_generic.rb', line 20 def qualifiedname @qualifiedname end |
#stereotype ⇒ Object (readonly)
Returns the value of attribute stereotype.
20 21 22 |
# File 'lib/rrt_ruby/rrt_generic.rb', line 20 def stereotype @stereotype end |
Instance Method Details
#to_s ⇒ Object
33 34 35 |
# File 'lib/rrt_ruby/rrt_generic.rb', line 33 def to_s return "<<#{@stereotype}>>#{@name}" end |