Class: VORuby::STC::V1_10::Coords::PosUnit

Inherits:
Unit show all
Defined in:
lib/voruby/stc/1.10/coords.rb

Overview

Coordinate units may be angular (degrees, radians, hours, arcmins, arcsecs), linear (meters, km, mm, AUs, parsecs, kpc, Mpc, lightyears), or empty (i.e., dimensionless)

Instance Attribute Summary

Attributes inherited from Enumeration

#choices, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Enumeration

#==, #to_s

Constructor Details

#initialize(u = '') ⇒ PosUnit

Returns a new instance of PosUnit.



39
40
41
42
# File 'lib/voruby/stc/1.10/coords.rb', line 39

def initialize(u='')
  u ||= ''
  super(u.to_s)
end

Class Method Details

.choicesObject



32
33
34
35
36
37
# File 'lib/voruby/stc/1.10/coords.rb', line 32

def self.choices
  [
    'deg', 'deg deg m', 'rad', 'h', 'arcmin', 'arcsec', 'm', 'km',
    'mm', 'au', 'pc', 'kpc', 'Mpc', 'lyr', ''
  ]
end