Class: VORuby::STC::V1_10::Coords::TimeOrigin
- Inherits:
-
Enumeration
- Object
- Enumeration
- VORuby::STC::V1_10::Coords::TimeOrigin
- Includes:
- AbsoluteTime
- Defined in:
- lib/voruby/stc/1.10/coords.rb
Overview
A relocatable time origin for simulations
Instance Attribute Summary
Attributes inherited from Enumeration
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(to = 'RELOCATABLE') ⇒ TimeOrigin
constructor
A new instance of TimeOrigin.
- #to_xml ⇒ Object
Methods included from AbsoluteTime
Methods included from SerializableToXml
Methods inherited from Enumeration
Constructor Details
#initialize(to = 'RELOCATABLE') ⇒ TimeOrigin
Returns a new instance of TimeOrigin.
212 213 214 |
# File 'lib/voruby/stc/1.10/coords.rb', line 212 def initialize(to='RELOCATABLE') self.value = to end |
Class Method Details
.choices ⇒ Object
210 |
# File 'lib/voruby/stc/1.10/coords.rb', line 210 def self.choices; ['RELOCATABLE'] end |
.from_xml(xml) ⇒ Object
223 224 225 |
# File 'lib/voruby/stc/1.10/coords.rb', line 223 def self.from_xml(xml) TimeOrigin.new(element_from(xml).text) end |
Instance Method Details
#to_xml ⇒ Object
216 217 218 219 220 221 |
# File 'lib/voruby/stc/1.10/coords.rb', line 216 def to_xml el = element() el.text = self.value.to_s collapse_namespaces(el) el end |