Class: VORuby::VOTables::VOTable::Type::CoordSystemType

Inherits:
Object
  • Object
show all
Defined in:
lib/voruby/votables/types.rb

Overview

A class representing the type of coordinate system.

Constant Summary collapse

@@systems =
['eq_FK4', 'eq_FK5', 'ICRS', 'ecl_FK4', 'ecl_FK5',
'galactic', 'supergalactic', 'xy', 'barycentric',
'geo_app']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(txt = 'eq_FK5') ⇒ CoordSystemType

txt:

The coordinate system type. Choices: eq_FK4, ICRS, ecl_FK4, ecl_FK5, galactic, supergalactic, xy, barycentric, geo_app.



189
190
191
192
193
194
195
196
# File 'lib/voruby/votables/types.rb', line 189

def initialize(txt='eq_FK5')
if txt and @@systems.include?(txt)
 @value = txt
else
 raise "Coordinate system type '#{txt}' is not valid.  Use one of: " +
	  @@systems.join(', ')
end
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



181
182
183
# File 'lib/voruby/votables/types.rb', line 181

def value
  @value
end

Instance Method Details

#to_sObject



198
199
200
# File 'lib/voruby/votables/types.rb', line 198

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