Class: IERS::Configuration
- Inherits:
-
Object
- Object
- IERS::Configuration
- Defined in:
- lib/iers/configuration.rb
Constant Summary collapse
- DEFAULT_CACHE_DIR =
Pathname("~/.cache/iers").
- DEFAULT_SOURCES =
{ finals: "https://datacenter.iers.org/data/latestVersion/finals.all.iau2000.txt", leap_seconds: "https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat" }.freeze
- DEFAULT_DOWNLOAD_TIMEOUT =
30- DEFAULT_INTERPOLATION =
:lagrange- DEFAULT_LAGRANGE_ORDER =
4- INTERPOLATION_METHODS =
%i[lagrange linear].freeze
Instance Attribute Summary collapse
- #cache_dir ⇒ Pathname
- #download_timeout ⇒ Integer
- #finals_path ⇒ Pathname?
-
#interpolation ⇒ Symbol
+:lagrange+ or +:linear+.
- #lagrange_order ⇒ Integer
- #leap_second_path ⇒ Pathname?
- #sources ⇒ Hash{Symbol => String}
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
30 31 32 33 34 35 36 37 38 |
# File 'lib/iers/configuration.rb', line 30 def initialize @cache_dir = DEFAULT_CACHE_DIR @sources = DEFAULT_SOURCES.dup @download_timeout = DEFAULT_DOWNLOAD_TIMEOUT @finals_path = nil @leap_second_path = nil @interpolation = DEFAULT_INTERPOLATION @lagrange_order = DEFAULT_LAGRANGE_ORDER end |
Instance Attribute Details
#cache_dir ⇒ Pathname
16 17 18 |
# File 'lib/iers/configuration.rb', line 16 def cache_dir @cache_dir end |
#download_timeout ⇒ Integer
20 21 22 |
# File 'lib/iers/configuration.rb', line 20 def download_timeout @download_timeout end |
#finals_path ⇒ Pathname?
22 23 24 |
# File 'lib/iers/configuration.rb', line 22 def finals_path @finals_path end |
#interpolation ⇒ Symbol
Returns +:lagrange+ or +:linear+.
26 27 28 |
# File 'lib/iers/configuration.rb', line 26 def interpolation @interpolation end |
#lagrange_order ⇒ Integer
28 29 30 |
# File 'lib/iers/configuration.rb', line 28 def lagrange_order @lagrange_order end |
#leap_second_path ⇒ Pathname?
24 25 26 |
# File 'lib/iers/configuration.rb', line 24 def leap_second_path @leap_second_path end |
#sources ⇒ Hash{Symbol => String}
18 19 20 |
# File 'lib/iers/configuration.rb', line 18 def sources @sources end |