module USNO::Transit::Bodies
Public Class Methods
fetch(k)
click to toggle source
# File lib/usno/transit/bodies.rb, line 4 def self.fetch(k) self.hash.fetch(k) { raise "Celestial object not recognized - #{k} not found in #{self.hash.keys.join(', ')}" } end
hash()
click to toggle source
# File lib/usno/transit/bodies.rb, line 11 def self.hash { "Sun" => 10, "Moon" => 11, "Mercury" => 1, "Venus" => 2,"Jupiter" => 5, "Mars" => 4, "Saturn" => 6, "Uranus" => 7, "Neptune" => 8, "Pluto" => 9, "Achernar" => -1, "Adhara" => -2, "Aldebaran" => -3, "Altair" => -4, "Antares" => -5, "Arcturus" => -6, "Betelgeuse" => -7, "Canopus" => -8, "Capella" => -9, "Deneb" => -10, "Fomalhaut" => -11, "Hadar" => -12, "Mimosa" => -13, "Polaris" => -14, "Pollux" => -15, "Procyon" => -16, "Regulus" => -17, "Rigel" => -18, "RigilKentaurus" => -19, "Vega" => -22, "Sirius" => -20, "Spica" => -21, } end