Class: VORuby::VOTable::V1_0::Description
- Inherits:
-
Base
- Object
- XML::Object::Base
- Base
- VORuby::VOTable::V1_0::Description
- Defined in:
- lib/voruby/votable/1.0/votable.rb
Overview
A simple description of something.
Constant Summary collapse
- ELEMENT_NAME =
'DESCRIPTION'
Instance Attribute Summary
Attributes inherited from XML::Object::Base
Instance Method Summary collapse
-
#initialize(defn = nil) ⇒ Description
constructor
Create a description.
-
#text ⇒ Object
Retrieve the actual text of the description.
-
#text=(text) ⇒ Object
Set the text of the description.
Methods inherited from Base
#==, element_name, #get_element, #xpath_for
Methods inherited from XML::Object::Base
#==, element_name, from_file, #to_s
Constructor Details
#initialize(defn = nil) ⇒ Description
Create a description.
descr = Description.new(:text => 'Hello, world!')
164 165 166 |
# File 'lib/voruby/votable/1.0/votable.rb', line 164 def initialize(defn=nil) super(defn) end |
Instance Method Details
#text ⇒ Object
Retrieve the actual text of the description.
169 170 171 |
# File 'lib/voruby/votable/1.0/votable.rb', line 169 def text self.node.content end |
#text=(text) ⇒ Object
Set the text of the description.
descr.text = 'Hello, world!'
175 176 177 |
# File 'lib/voruby/votable/1.0/votable.rb', line 175 def text=(text) @node.content = text end |