Class: VORuby::VOTable::V1_1::Definitions

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

Overview

Definitions of various values appropriate to the votable. DEPRECATED.

Constant Summary collapse

ELEMENT_NAME =
'DEFINITIONS'

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) ⇒ Definitions

Create a set of definitions.

definitions = Definitions.new(
  :coordinate_systems => [Coosys.new]
  :params => [Param.new]
)


196
197
198
# File 'lib/voruby/votable/1.1/votable.rb', line 196

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

Instance Method Details

#coordinate_systemsObject

Retrieve the coordinate systems (Coosys). Returns a HomogeneousNodeList.



202
203
204
# File 'lib/voruby/votable/1.1/votable.rb', line 202

def coordinate_systems
  HomogeneousNodeList.new(self.node, xpath_for(Coosys), Coosys)
end

#coordinate_systems=(systems) ⇒ Object

Set the coordinate systems. Takes an array of Coosys objects.

definitions.coordinate_systems = [Coosys.new(), ...]


209
210
211
# File 'lib/voruby/votable/1.1/votable.rb', line 209

def coordinate_systems=(systems)
  self.coordinate_systems.replace(systems)
end

#paramsObject

Retrieve the parameters (Param). Returns a HomogeneousNodeList.



215
216
217
# File 'lib/voruby/votable/1.1/votable.rb', line 215

def params
  HomogeneousNodeList.new(self.node, xpath_for(Param), Param)
end

#params=(parameters) ⇒ Object

Set the parameter list. Takes an array of Param objects.

definitions.params = [Param.new(), ...]


222
223
224
# File 'lib/voruby/votable/1.1/votable.rb', line 222

def params=(parameters)
  self.params.replace(parameters)
end