Class: VORuby::STC::V1_30::PosUnitType
- Inherits:
-
UnitType
- Object
- Enumeration
- UnitType
- VORuby::STC::V1_30::PosUnitType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Spatial coordinate units may be angular (degrees, radians, hours, arcmins, arcsecs), linear (meters, km, mm, AUs, parsecs, kpc, Mpc, lightyears), or empty (i.e., dimensionless). The three-units strings are for special 3-D vectors where the components do not share the same unit; one may prefer to give each component its own unit, instead.
Instance Attribute Summary
Attributes inherited from Enumeration
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(u = '') ⇒ PosUnitType
constructor
A new instance of PosUnitType.
Methods inherited from Enumeration
Constructor Details
#initialize(u = '') ⇒ PosUnitType
Returns a new instance of PosUnitType.
39 40 41 42 |
# File 'lib/voruby/stc/1.30/stc.rb', line 39 def initialize(u='') u ||= '' super(u.to_s) end |
Class Method Details
.choices ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/voruby/stc/1.30/stc.rb', line 31 def self.choices [ 'deg', 'deg deg m', 'deg deg Mpc', 'rad', 'h', 'arcmin', 'arcsec', 'm', 'km', 'mm', 'AU', 'pc', 'kpc', 'Mpc', 'lyr', '' ] end |