Class: RRT_RUBY::RRTLogical::Attribute

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

Instance Attribute Summary collapse

Attributes inherited from RRT_RUBY::RRTGeneric::Element

#documentation, #name, #qualifiedname, #stereotype

Instance Method Summary collapse

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_valueObject (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

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



196
197
198
# File 'lib/rrt_ruby/rrt_logical.rb', line 196

def to_s
  return "#{@name}=#{@init_value}/#{@type}"
end