Class: Id
Overview
Basic ID
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #==(id) ⇒ Object
-
#initialize(ref) ⇒ Id
constructor
A new instance of Id.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(ref) ⇒ Id
Returns a new instance of Id.
289 290 291 |
# File 'lib/voruby/misc.rb', line 289 def initialize(ref) self.value = ref end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
285 286 287 |
# File 'lib/voruby/misc.rb', line 285 def value @value end |
Class Method Details
.from_xml(xml) ⇒ Object
312 313 314 |
# File 'lib/voruby/misc.rb', line 312 def self.from_xml(xml) self.new(element_from(xml).text) end |
Instance Method Details
#==(id) ⇒ Object
302 303 304 |
# File 'lib/voruby/misc.rb', line 302 def ==(id) self.value == id.value end |
#to_s ⇒ Object
298 299 300 |
# File 'lib/voruby/misc.rb', line 298 def to_s self.value.to_s end |
#to_xml(name = nil) ⇒ Object
306 307 308 309 310 |
# File 'lib/voruby/misc.rb', line 306 def to_xml(name=nil) el = element(name) el.text = self.value.to_s el end |