Class: VORuby::ADQL::LiteralType
- Defined in:
- lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb
Overview
The base type for all literals.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_xml(node) ⇒ Object
347 348 349 350 351 352 |
# File 'lib/voruby/adql/adql.rb', line 347 def self.from_xml(node) #type_s = node.attributes['xsi:type'] type_s = node.find_attribute('type', 'http://www.w3.org/2001/XMLSchema-instance') literal = ObjectBuilder.get_class_for(type_s).from_xml(node) return literal end |
Instance Method Details
#to_adqls ⇒ Object
83 84 85 |
# File 'lib/voruby/adql/transforms.rb', line 83 def to_adqls self.value.to_s end |
#to_adqlx(literal_type) ⇒ Object
87 88 89 |
# File 'lib/voruby/adql/transforms.rb', line 87 def to_adqlx(literal_type) "<Literal xsi:type=\"#{literal_type}\" Value=\"#{self.value.to_s}\" />" end |
#to_s ⇒ Object
343 344 345 |
# File 'lib/voruby/adql/adql.rb', line 343 def to_s "{value=#{self.value}}" end |