Class: VORuby::STC::V1_10::STC::SpectralFrameType
- Inherits:
-
CoordFrameType
- Object
- CoordFrameType
- VORuby::STC::V1_10::STC::SpectralFrameType
- Defined in:
- lib/voruby/stc/1.10/stc.rb
Overview
ontains the spectral frame reference position
Direct Known Subclasses
Instance Attribute Summary collapse
-
#reference_position ⇒ Object
Returns the value of attribute reference_position.
Attributes inherited from CoordFrameType
Class Method Summary collapse
Instance Method Summary collapse
- #==(p) ⇒ Object
-
#initialize(options = {}) ⇒ SpectralFrameType
constructor
A new instance of SpectralFrameType.
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(options = {}) ⇒ SpectralFrameType
Returns a new instance of SpectralFrameType.
1268 1269 1270 1271 |
# File 'lib/voruby/stc/1.10/stc.rb', line 1268 def initialize(={}) raise_argument_required_error('reference position') if !.has_key?(:reference_position) super() end |
Instance Attribute Details
#reference_position ⇒ Object
Returns the value of attribute reference_position.
1266 1267 1268 |
# File 'lib/voruby/stc/1.10/stc.rb', line 1266 def reference_position @reference_position end |
Class Method Details
.from_xml(xml) ⇒ Object
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 |
# File 'lib/voruby/stc/1.10/stc.rb', line 1291 def self.from_xml(xml) root = element_from(xml) = { :reference_position => xml_to_obj(root, ReferencePosition, true) } name = REXML::XPath.first(root, 'x:Name', {'x' => obj_ns.uri}) [:name] = name.text if name self.new() end |
Instance Method Details
#==(p) ⇒ Object
1280 1281 1282 |
# File 'lib/voruby/stc/1.10/stc.rb', line 1280 def ==(p) super(p) and self.reference_position == p.reference_position end |
#to_xml(name = nil) ⇒ Object
1284 1285 1286 1287 1288 1289 |
# File 'lib/voruby/stc/1.10/stc.rb', line 1284 def to_xml(name=nil) el = super(name) el.add_element(self.reference_position.to_xml) collapse_namespaces(el) el end |