Class: RRT_RUBY::RRTLogical::Attribute
- Inherits:
-
RRT_RUBY::RRTGeneric::Element
- Object
- RRT_RUBY::RRTGeneric::Element
- RRT_RUBY::RRTLogical::Attribute
- Defined in:
- lib/rrt_ruby/rrt_logical.rb
Instance Attribute Summary collapse
-
#init_value ⇒ Object
readonly
Returns the value of attribute init_value.
-
#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) ⇒ Attribute
constructor
A new instance of Attribute.
- #to_s ⇒ Object
Constructor Details
#initialize(element) ⇒ Attribute
Returns a new instance of Attribute.
186 187 188 189 190 191 192 193 194 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 186 def initialize element begin super(element) @init_value=element.InitValue @type=element.Type rescue raise RRTGeneric::ElementException.new(element),"error while initialising element: #{$!}" end end |
Instance Attribute Details
#init_value ⇒ Object (readonly)
Returns the value of attribute init_value.
184 185 186 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 184 def init_value @init_value end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
184 185 186 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 184 def type @type end |
Instance Method Details
#to_s ⇒ Object
196 197 198 |
# File 'lib/rrt_ruby/rrt_logical.rb', line 196 def to_s return "#{@name}=#{@init_value}/#{@type}" end |