Class: VORuby::VOTables::VOTable::Meta::Description

Inherits:
Object
  • Object
show all
Defined in:
lib/voruby/votables/meta.rb,
lib/voruby/votables/transforms.rb,
lib/voruby/votables/rexml_parser.rb,
lib/voruby/votables/libxml_parser.rb

Overview

A class representing the standard VOTable DESCRIPTION element.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(txt = nil) ⇒ Description

txt:

The text of the description.



18
19
20
# File 'lib/voruby/votables/meta.rb', line 18

def initialize(txt=nil)
@text = txt
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



15
16
17
# File 'lib/voruby/votables/meta.rb', line 15

def text
  @text
end

Class Method Details

.from_soap_obj(mdesc) ⇒ Object



31
32
33
# File 'lib/voruby/votables/transforms.rb', line 31

def self.from_soap_obj(mdesc)
  Description.new(mdesc)
end

.from_xml(node) ⇒ Object



9
10
11
# File 'lib/voruby/votables/rexml_parser.rb', line 9

def self.from_xml(node)
return Meta::Description.new(node.text)
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/voruby/votables/meta.rb', line 22

def to_s
"{#{@text}}"
end