Class: VORuby::STC::V1_10::STC::VelocityIntervalType
- Inherits:
-
PositionIntervalType
- Object
- SpatialIntervalType
- PositionIntervalType
- VORuby::STC::V1_10::STC::VelocityIntervalType
- Defined in:
- lib/voruby/stc/1.10/stc.rb
Overview
Contains a spatial velocity CoordInterval. A special kind of area is a circle or sphere (in two or three dimensions), defined by a center position and a radius; the radius requires a unit
Direct Known Subclasses
Instance Attribute Summary collapse
-
#vel_time_unit ⇒ Object
Returns the value of attribute vel_time_unit.
Attributes inherited from PositionIntervalType
Class Method Summary collapse
Instance Method Summary collapse
- #==(s) ⇒ Object
-
#initialize(options = {}) ⇒ VelocityIntervalType
constructor
A new instance of VelocityIntervalType.
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(options = {}) ⇒ VelocityIntervalType
Returns a new instance of VelocityIntervalType.
2233 2234 2235 2236 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2233 def initialize(={}) raise_argument_required_error('velocity time unit') if !.has_key?(:vel_time_unit) super() end |
Instance Attribute Details
#vel_time_unit ⇒ Object
Returns the value of attribute vel_time_unit.
2231 2232 2233 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2231 def vel_time_unit @vel_time_unit end |
Class Method Details
.from_xml(xml) ⇒ Object
2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2257 def self.from_xml(xml) root = element_from(xml) = { :unit => PosUnit.new(root.attributes.get_attribute_ns(obj_ns.uri, 'unit').value), :vel_time_unit => VelTimeUnit.new(root.attributes.get_attribute_ns(obj_ns.uri, 'vel_time_unit').value), :coord_interval => xml_to_obj(root, CoordInterval, true) } self.new() end |
Instance Method Details
#==(s) ⇒ Object
2247 2248 2249 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2247 def ==(s) super(s) and self.vel_time_unit == s.vel_time_unit end |
#to_xml(name = nil) ⇒ Object
2251 2252 2253 2254 2255 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2251 def to_xml(name=nil) el = super(name) el.attributes["#{obj_ns.prefix}:vel_time_unit"] = self.vel_time_unit.to_s el end |