Class: RRT_RUBY::RRTComponent::Component

Inherits:
RRT_RUBY::RRTGeneric::Element show all
Defined in:
lib/rrt_ruby/rrt_component.rb

Overview

Represents an RRT Component

Direct Known Subclasses

Executable, Library

Instance Attribute Summary collapse

Attributes inherited from RRT_RUBY::RRTGeneric::Element

#documentation, #name, #qualifiedname, #stereotype

Instance Method Summary collapse

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

#packageObject (readonly)

Returns the value of attribute package.



13
14
15
# File 'lib/rrt_ruby/rrt_component.rb', line 13

def package
  @package
end

#platformObject (readonly)

Returns the value of attribute platform.



13
14
15
# File 'lib/rrt_ruby/rrt_component.rb', line 13

def platform
  @platform
end

#typeObject (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_sObject



24
25
26
# File 'lib/rrt_ruby/rrt_component.rb', line 24

def to_s
  super()+", #{@type}/#{@platform}."
end