Class: VORuby::STC::V1_30::RelocatableOriginType

Inherits:
Enumeration
  • Object
show all
Includes:
SerializableToXml
Defined in:
lib/voruby/stc/1.30/stc.rb

Overview

A relocatable time origin for simulations

Direct Known Subclasses

TimeOrigin

Instance Attribute Summary

Attributes inherited from Enumeration

#choices, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SerializableToXml

#element

Methods inherited from Enumeration

#==, #initialize, #to_s

Constructor Details

This class inherits a constructor from Enumeration

Class Method Details

.choicesObject



381
# File 'lib/voruby/stc/1.30/stc.rb', line 381

def self.choices; ['RELOCATABLE'] end

.from_xml(xml) ⇒ Object



389
390
391
392
# File 'lib/voruby/stc/1.30/stc.rb', line 389

def self.from_xml(xml)
  root = element_from(xml)
  self.new(root.text)
end

Instance Method Details

#to_xml(name = nil) ⇒ Object



383
384
385
386
387
# File 'lib/voruby/stc/1.30/stc.rb', line 383

def to_xml(name=nil)
  el = element(name)
  el.text = self.value.to_s
  el
end