Class: VORuby::VOTable::V1_0::Description

Inherits:
Base show all
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

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


164
165
166
# File 'lib/voruby/votable/1.0/votable.rb', line 164

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

Instance Method Details

#textObject

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