Class: VORuby::STC::V1_30::HSOffsetType

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SerializableToXml

#element

Constructor Details

#initialize(value) ⇒ HSOffsetType

Returns a new instance of HSOffsetType.



5714
5715
5716
# File 'lib/voruby/stc/1.30/stc.rb', line 5714

def initialize(value)
  self.value = value
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



5712
5713
5714
# File 'lib/voruby/stc/1.30/stc.rb', line 5712

def value
  @value
end

Class Method Details

.from_xml(xml) ⇒ Object



5739
5740
5741
5742
# File 'lib/voruby/stc/1.30/stc.rb', line 5739

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

Instance Method Details

#==(h) ⇒ Object



5727
5728
5729
# File 'lib/voruby/stc/1.30/stc.rb', line 5727

def ==(h)
  self.value == h.value
end

#to_sObject



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

def to_s; self.value.to_s end

#to_xml(name = nil) ⇒ Object



5733
5734
5735
5736
5737
# File 'lib/voruby/stc/1.30/stc.rb', line 5733

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