Class: RRT_RUBY::RRTComponent::Executable

Inherits:
Component show all
Defined in:
lib/rrt_ruby/rrt_component.rb

Overview

An Executable Component

Instance Attribute Summary collapse

Attributes inherited from Component

#package, #platform, #type

Attributes inherited from RRT_RUBY::RRTGeneric::Element

#documentation, #name, #qualifiedname, #stereotype

Instance Method Summary collapse

Constructor Details

#initialize(element) ⇒ Executable

Returns a new instance of Executable.



48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rrt_ruby/rrt_component.rb', line 48

def initialize element
	begin
		super(element)
		@topcapsule=element.FindProperty("OT::CppExec","TopCapsule").Value.sub("[event_ui\r\n\tdescription='","")
		@topcapsule.sub!(/'\r\n\tcaption='Select.+\n.*/,"")
		@filename=""
		
	rescue
		raise RRTGeneric::ElementException.new(element),"error while initialising element: #{$!}"
	end
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



46
47
48
# File 'lib/rrt_ruby/rrt_component.rb', line 46

def filename
  @filename
end

#topcapsuleObject (readonly)

Returns the value of attribute topcapsule.



46
47
48
# File 'lib/rrt_ruby/rrt_component.rb', line 46

def topcapsule
  @topcapsule
end

Instance Method Details

#to_sObject



59
60
61
# File 'lib/rrt_ruby/rrt_component.rb', line 59

def to_s
	super()+", #{@topcapsule}."
end