Class: VORuby::VOTable::V1_1::Description

Inherits:
Base show all
Defined in:
lib/voruby/votable/1.1/votable.rb

Overview

A simple description of something.

Constant Summary collapse

ELEMENT_NAME =
'DESCRIPTION'

Instance Attribute Summary

Attributes inherited from XML::Object::Base

#node

Instance Method Summary collapse

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!')


166
167
168
# File 'lib/voruby/votable/1.1/votable.rb', line 166

def initialize(defn=nil)
  super(defn)
end

Instance Method Details

#textObject

Retrieve the actual text of the description.



171
172
173
# File 'lib/voruby/votable/1.1/votable.rb', line 171

def text
  self.node.content
end

#text=(text) ⇒ Object

Set the text of the description.

descr.text = 'Hello, world!'


177
178
179
# File 'lib/voruby/votable/1.1/votable.rb', line 177

def text=(text)
  @node.content = text
end