Class: VORuby::STC::V1_30::SpectralIntervalType
- Inherits:
-
CoordScalarIntervalType
- Object
- STCBaseType
- CoordIntervalType
- CoordScalarIntervalType
- VORuby::STC::V1_30::SpectralIntervalType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Contains a 1-D spectral interval.
Instance Attribute Summary collapse
-
#unit ⇒ Object
Returns the value of attribute unit.
Attributes inherited from CoordScalarIntervalType
Attributes inherited from CoordIntervalType
#fill_factor, #frame_id, #hi_include, #lo_include
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
- #==(i) ⇒ Object
-
#initialize(unit, lo_limit, hi_limit, lo_include = true, hi_include = true, options = {}) ⇒ SpectralIntervalType
constructor
A new instance of SpectralIntervalType.
- #to_xml(name = nil) ⇒ Object
Methods inherited from CoordScalarIntervalType
coord_scalar_interval_from_xml
Methods inherited from CoordIntervalType
coord_interval_from_xml, #hi_include?, #lo_include?
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(unit, lo_limit, hi_limit, lo_include = true, hi_include = true, options = {}) ⇒ SpectralIntervalType
Returns a new instance of SpectralIntervalType.
4837 4838 4839 4840 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4837 def initialize(unit, lo_limit, hi_limit, lo_include=true, hi_include=true, ={}) self.unit = unit super(lo_limit, hi_limit, lo_include, hi_include, ) end |
Instance Attribute Details
#unit ⇒ Object
Returns the value of attribute unit.
4835 4836 4837 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4835 def unit @unit end |
Class Method Details
.from_xml(xml) ⇒ Object
4861 4862 4863 4864 4865 4866 4867 4868 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4861 def self.from_xml(xml) root = element_from(xml) self.new( SpectralUnitType.new(root.attributes.get_attribute_ns(obj_ns.uri, 'unit').value), *CoordScalarIntervalType.coord_scalar_interval_from_xml(root) ) end |
Instance Method Details
#==(i) ⇒ Object
4851 4852 4853 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4851 def ==(i) super(i) and self.unit == i.unit end |
#to_xml(name = nil) ⇒ Object
4855 4856 4857 4858 4859 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4855 def to_xml(name=nil) el = super(name) el.attributes["#{obj_ns.prefix}:unit"] = self.unit.to_s el end |