Class: VORuby::STC::V1_10::Coords::Size

Inherits:
Object
  • Object
show all
Includes:
CSize
Defined in:
lib/voruby/stc/1.10/coords.rb

Overview

double

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CSize

#==, #to_s

Methods included from SerializableToXml

#element

Constructor Details

#initialize(value) ⇒ Size

Returns a new instance of Size.



575
576
577
# File 'lib/voruby/stc/1.10/coords.rb', line 575

def initialize(value)
  self.value = value
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



573
574
575
# File 'lib/voruby/stc/1.10/coords.rb', line 573

def value
  @value
end

Class Method Details

.from_xml(xml) ⇒ Object



590
591
592
# File 'lib/voruby/stc/1.10/coords.rb', line 590

def self.from_xml(xml)
  Size.new(element_from(xml).text)
end

Instance Method Details

#to_xmlObject



583
584
585
586
587
588
# File 'lib/voruby/stc/1.10/coords.rb', line 583

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