Class: VORuby::STC::V1_10::Coords::TimeUnit

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

Overview

Time units may be second (s), hour (h: 3600 s), day (d: 86400 s), Julian year (a, yr: 365.25 d), Julian century (cy: 36525 d), or empty (i.e., dimensionless) for ISO-8601 format

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 = '') ⇒ TimeUnit

Returns a new instance of TimeUnit.



22
23
24
25
# File 'lib/voruby/stc/1.10/coords.rb', line 22

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

Class Method Details

.choicesObject



18
19
20
# File 'lib/voruby/stc/1.10/coords.rb', line 18

def self.choices
  ['s', 'h', 'd', 'a', 'yr', 'cy', '']
end