Class: VORuby::STC::V1_30::STCRegion
- Inherits:
-
STCMetadataType
- Object
- STCBaseType
- STCMetadataType
- VORuby::STC::V1_30::STCRegion
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Type for STC Region.
Instance Attribute Summary collapse
-
#coord_sys ⇒ Object
Returns the value of attribute coord_sys.
-
#region ⇒ Object
Returns the value of attribute region.
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
- #==(r) ⇒ Object
-
#initialize(coord_sys, region, options = {}) ⇒ STCRegion
constructor
A new instance of STCRegion.
- #to_xml(name = nil) ⇒ Object
Methods inherited from STCMetadataType
Methods inherited from STCBaseType
Methods included from STCReference
#stc_reference_eq, stc_reference_from_xml, #stc_reference_to_xml
Methods included from SerializableToXml
Constructor Details
#initialize(coord_sys, region, options = {}) ⇒ STCRegion
Returns a new instance of STCRegion.
8562 8563 8564 8565 8566 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8562 def initialize(coord_sys, region, ={}) super() self.coord_sys = coord_sys self.region = region end |
Instance Attribute Details
#coord_sys ⇒ Object
Returns the value of attribute coord_sys.
8560 8561 8562 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8560 def coord_sys @coord_sys end |
#region ⇒ Object
Returns the value of attribute region.
8560 8561 8562 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8560 def region @region end |
Class Method Details
.from_xml(xml) ⇒ Object
8596 8597 8598 8599 8600 8601 8602 8603 8604 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8596 def self.from_xml(xml) root = element_from(xml) self.new( xml_to_obj(root, AstroCoordSystem, true), xml_to_obj(root, Region, true), *STCMetadataType.(root) ) end |
Instance Method Details
#==(r) ⇒ Object
8580 8581 8582 8583 8584 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8580 def ==(r) super(r) and self.coord_sys == r.coord_sys and self.region == r.region end |
#to_xml(name = nil) ⇒ Object
8586 8587 8588 8589 8590 8591 8592 8593 8594 |
# File 'lib/voruby/stc/1.30/stc.rb', line 8586 def to_xml(name=nil) el = super(name) el.add_element(self.coord_sys.to_xml) el.add_element(self.region.to_xml) collapse_namespaces(el) el end |