class Gdsii::Property
GDSII element property
Public Class Methods
new(attr=nil, value=nil)
click to toggle source
Property object constructor. A property consists of a attribute number (Fixnum) and a respective property value as a String.
Calls superclass method
Gdsii::Group.new
# File lib/gdsii/property.rb, line 29 def initialize(attr=nil, value=nil) super() self.attr = attr unless attr.nil? self.value = value unless value.nil? end
Public Instance Methods
<=>(other)
click to toggle source
Define order for sorting and comparing of property values (through inclusion of Comparable module)
# File lib/gdsii/property.rb, line 59 def <=>(other) self.attr <=> other.attr end
attr()
click to toggle source
Get the attribute number (Fixnum)
# File lib/gdsii/property.rb, line 38 def attr() @records.get_data(GRT_PROPATTR); end
attr=(val)
click to toggle source
Set the attribute record
# File lib/gdsii/property.rb, line 43 def attr=(val) @records.set(GRT_PROPATTR,val); end
value()
click to toggle source
Get the property value (String)
# File lib/gdsii/property.rb, line 48 def value() @records.get_data(GRT_PROPVALUE); end
value=(val)
click to toggle source
Set the property value
# File lib/gdsii/property.rb, line 53 def value=(val) @records.set(GRT_PROPVALUE,val); end