Class: VORuby::ADQL::V1_0::StringLiteral
- Inherits:
-
Literal
- Object
- Literal
- VORuby::ADQL::V1_0::StringLiteral
show all
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
Represents a string literal
Instance Attribute Summary
Attributes inherited from Literal
#value
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Literal
#==, #initialize, #to_xml
#element
Class Method Details
.from_xml(xml) ⇒ Object
339
340
341
342
343
344
|
# File 'lib/voruby/adql/1.0/adql.rb', line 339
def self.from_xml(xml)
root = element_from(xml)
self.new(
root.attributes.get_attribute_ns(obj_ns.uri, 'Value').value
)
end
|
.xml_type ⇒ Object
328
|
# File 'lib/voruby/adql/1.0/adql.rb', line 328
def self.xml_type; 'stringType' end
|
Instance Method Details
#to_s ⇒ Object
335
336
337
|
# File 'lib/voruby/adql/1.0/adql.rb', line 335
def to_s
"'#{super}'"
end
|
#value=(v) ⇒ Object
330
331
332
333
|
# File 'lib/voruby/adql/1.0/adql.rb', line 330
def value=(v)
raise_argument_required_error('value') if v == nil
super(v.to_s)
end
|