Class: VORuby::STC::V1_30::Size2Type
- Inherits:
-
Double2Type
- Object
- STCBaseType
- Double2Type
- VORuby::STC::V1_30::Size2Type
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Consists of a Size (2 doubles) and optional position angle element.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#pos_angle ⇒ Object
Returns the value of attribute pos_angle.
Attributes inherited from Double2Type
#c1, #c2, #gen_unit, #unit, #vel_time_unit
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Double2Type
double2_from_xml, #initialize, #to_s
Methods inherited from STCBaseType
#initialize, stc_base_from_xml
Methods included from STCReference
#stc_reference_eq, stc_reference_from_xml, #stc_reference_to_xml
Methods included from SerializableToXml
Constructor Details
This class inherits a constructor from VORuby::STC::V1_30::Double2Type
Instance Attribute Details
#pos_angle ⇒ Object
Returns the value of attribute pos_angle.
1757 1758 1759 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1757 def pos_angle @pos_angle end |
Class Method Details
.from_xml(xml) ⇒ Object
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1775 def self.from_xml(xml) root = element_from(xml) c1, c2, = Double2Type.double2_from_xml(root) pos_angle = REXML::XPath.first(root, 'x:PosAngle', {'x' => obj_ns.uri}) [:pos_angle] = PosAngleType.from_xml(pos_angle) if pos_angle self.new(c1, c2, ) end |
Instance Method Details
#==(s) ⇒ Object
1764 1765 1766 1767 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1764 def ==(s) super(s) and self.pos_angle == s.pos_angle end |
#to_xml(name = nil) ⇒ Object
1769 1770 1771 1772 1773 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1769 def to_xml(name=nil) el = super(name) el.add_element(self.pos_angle.to_xml('PosAngle')) if self.pos_angle el end |