Class: VORuby::STC::V1_30::CoordValueType
- Inherits:
-
Object
- Object
- VORuby::STC::V1_30::CoordValueType
- Includes:
- SerializableToXml
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
A type that just holds a 1-3D coordinate value; see comment in the CoordValue head element.
Instance Attribute Summary collapse
-
#coord_value ⇒ Object
Returns the value of attribute coord_value.
Class Method Summary collapse
Instance Method Summary collapse
- #==(v) ⇒ Object
-
#initialize(coord_value) ⇒ CoordValueType
constructor
A new instance of CoordValueType.
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(coord_value) ⇒ CoordValueType
Returns a new instance of CoordValueType.
1359 1360 1361 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1359 def initialize(coord_value) self.coord_value = coord_value end |
Instance Attribute Details
#coord_value ⇒ Object
Returns the value of attribute coord_value.
1357 1358 1359 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1357 def coord_value @coord_value end |
Class Method Details
.from_xml(xml) ⇒ Object
1380 1381 1382 1383 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1380 def self.from_xml(xml) root = element_from(xml) self.new(xml_to_obj(root, CoordValue, true)) end |
Instance Method Details
#==(v) ⇒ Object
1369 1370 1371 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1369 def ==(v) self.coord_value == v.coord_value end |
#to_xml(name = nil) ⇒ Object
1373 1374 1375 1376 1377 1378 |
# File 'lib/voruby/stc/1.30/stc.rb', line 1373 def to_xml(name=nil) el = element(name) el.add_element(self.coord_value.to_xml) collapse_namespaces(el) el end |