class LibTAD::Astronomy::MoonPhase

Moon phase.

Attributes

id[R]

@return [String] Moonphase id.

Public Class Methods

new(id) click to toggle source
# File lib/types/astronomy/moonphase.rb, line 32
def initialize(id)
  @id = id
end

Public Instance Methods

description() click to toggle source

@return [String] Moonphase description.

# File lib/types/astronomy/moonphase.rb, line 11
def description
  case @id
  when 'newmoon'
    'New moon'
  when 'waxingcrescent'
    'Waxing crescent'
  when 'firstquarter'
    'Moon in first quarter'
  when 'waxinggibbous'
    'Waxing gibbous moon'
  when 'fullmoon'
    'Full moon'
  when 'waninggibbous'
    'Waning gibbous moon'
  when 'thirdquarter'
    'Moon in third quarter'
  when 'waningcrescent'
    'Waning crescent moon'
  end
end