Class: VORuby::STC::V1_30::ObservatoryLocationType
- Inherits:
-
STCDescriptionType
- Object
- STCBaseType
- STCMetadataType
- STCDescriptionType
- VORuby::STC::V1_30::ObservatoryLocationType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Type for an observatory location.
Instance Attribute Summary
Attributes inherited from STCDescriptionType
#coord_areas, #coord_sys, #coords
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from STCDescriptionType
#==, #initialize, stc_description_from_xml, #to_xml
Methods inherited from STCMetadataType
Methods inherited from STCBaseType
#==, #initialize, stc_base_from_xml, #to_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::STCDescriptionType
Class Method Details
.from_xml(xml) ⇒ Object
8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8282 def self.from_xml(xml) root = element_from(xml) css, cs, cas, = STCDescriptionType.stc_description_from_xml(root) coord_sys = xml_to_obj(root, AstroCoordSystem) coord_sys = nil if coord_sys.size == 0 coords = xml_to_obj(root, AstroCoords) coords = nil if coords.size == 0 self.new( coord_sys ? AstroCoordSystemList.new(coord_sys) : nil, coords ? AstroCoordsList.new(coords) : nil, cas, || {} ) end |
Instance Method Details
#coord_sys=(cs) ⇒ Object
8266 8267 8268 8269 8270 8271 8272 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8266 def coord_sys=(cs) if cs cs = AstroCoordSystemList.new(cs) if cs.class == Array raise_type_mismatch_error(cs, AstroCoordSystemList) end @coord_sys = cs end |
#coords=(cs) ⇒ Object
8274 8275 8276 8277 8278 8279 8280 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8274 def coords=(cs) if cs cs = AstroCoordsList.new(cs) if cs.class == Array raise_type_mismatch_error(cs, AstroCoordsList) end @coords = cs end |