Class: VORuby::ADQL::V1_0::Literal
- Inherits:
-
Object
- Object
- VORuby::ADQL::V1_0::Literal
- Includes:
- SerializableToXml
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
The base type for all literals
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(l) ⇒ Object
-
#initialize(v) ⇒ Literal
constructor
A new instance of Literal.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(v) ⇒ Literal
Returns a new instance of Literal.
266 267 268 |
# File 'lib/voruby/adql/1.0/adql.rb', line 266 def initialize(v) self.value = v end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
264 265 266 |
# File 'lib/voruby/adql/1.0/adql.rb', line 264 def value @value end |
Instance Method Details
#==(l) ⇒ Object
274 275 276 |
# File 'lib/voruby/adql/1.0/adql.rb', line 274 def ==(l) self.value == l.value end |
#to_s ⇒ Object
278 279 280 |
# File 'lib/voruby/adql/1.0/adql.rb', line 278 def to_s self.value.to_s end |
#to_xml(name = nil) ⇒ Object
282 283 284 285 286 |
# File 'lib/voruby/adql/1.0/adql.rb', line 282 def to_xml(name=nil) el = element_root(name) el.attributes["#{obj_ns.prefix}:Value"] = self.value.to_s el end |