Class: VORuby::VOTables::VOTable::Type::CoordSystemType
- 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
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(txt = 'eq_FK5') ⇒ CoordSystemType
constructor
- txt:
-
The coordinate system type.
- #to_s ⇒ Object
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
#value ⇒ Object (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_s ⇒ Object
198 199 200 |
# File 'lib/voruby/votables/types.rb', line 198 def to_s "{#{@value}}" end |