Class: IdRef
Overview
Basic IDREF
Direct Known Subclasses
VORuby::STC::V1_10::Coords::Error2Ref, VORuby::STC::V1_10::Coords::Error3Ref, VORuby::STC::V1_10::Coords::ErrorRef, VORuby::STC::V1_10::Coords::ISOTimeRef, VORuby::STC::V1_10::Coords::JDTimeRef, VORuby::STC::V1_10::Coords::MJDTimeRef, VORuby::STC::V1_10::Coords::PixSize2Ref, VORuby::STC::V1_10::Coords::PixSize3Ref, VORuby::STC::V1_10::Coords::PixSizeRef, VORuby::STC::V1_10::Coords::Resolution2Ref, VORuby::STC::V1_10::Coords::Resolution3Ref, VORuby::STC::V1_10::Coords::ResolutionRef, VORuby::STC::V1_10::Coords::Size2Ref, VORuby::STC::V1_10::Coords::Size3Ref, VORuby::STC::V1_10::Coords::SizeRef, VORuby::STC::V1_10::Coords::TimeOffsetRef, VORuby::STC::V1_10::Coords::Value2Ref, VORuby::STC::V1_10::Coords::Value3Ref, VORuby::STC::V1_10::Coords::ValueRef
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #==(id) ⇒ Object
-
#initialize(ref) ⇒ IdRef
constructor
A new instance of IdRef.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(ref) ⇒ IdRef
Returns a new instance of IdRef.
255 256 257 |
# File 'lib/voruby/misc.rb', line 255 def initialize(ref) self.value = ref end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
253 254 255 |
# File 'lib/voruby/misc.rb', line 253 def value @value end |
Class Method Details
.from_xml(xml) ⇒ Object
278 279 280 |
# File 'lib/voruby/misc.rb', line 278 def self.from_xml(xml) self.new(element_from(xml).text) end |
Instance Method Details
#==(id) ⇒ Object
268 269 270 |
# File 'lib/voruby/misc.rb', line 268 def ==(id) self.value == id.value end |
#to_s ⇒ Object
264 265 266 |
# File 'lib/voruby/misc.rb', line 264 def to_s self.value.to_s end |
#to_xml(name = nil) ⇒ Object
272 273 274 275 276 |
# File 'lib/voruby/misc.rb', line 272 def to_xml(name=nil) el = element(name) el.text = self.value.to_s el end |