Class: VORuby::STC::V1_30::HSOffsetType
- Inherits:
-
Object
- Object
- VORuby::STC::V1_30::HSOffsetType
- Includes:
- SerializableToXml
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #==(h) ⇒ Object
-
#initialize(value) ⇒ HSOffsetType
constructor
A new instance of HSOffsetType.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
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
#value ⇒ Object
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_s ⇒ Object
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 |