Class: Astro::Moon::Phase

Inherits:
Struct
  • Object
show all
Defined in:
lib/astro/moon.rb

Overview

a container structure for phase() return value. accessors:

phase - moon phase, 0 or 1 for new moon, 0.5 for full moon, etc
illumination - moon illumination, 0.0 .. 0.1
age - moon age, in days from the most recent new moon
distance - moon distance from earth, in kilometers
angle - moon angle
sun_distance - sun distance from earth, in kilometers
sun_angle - sun angle

Instance Attribute Summary collapse

Instance Attribute Details

#ageObject

Returns the value of attribute age

Returns:

  • (Object)

    the current value of age



22
23
24
# File 'lib/astro/moon.rb', line 22

def age
  @age
end

#angleObject

Returns the value of attribute angle

Returns:

  • (Object)

    the current value of angle



22
23
24
# File 'lib/astro/moon.rb', line 22

def angle
  @angle
end

#distanceObject

Returns the value of attribute distance

Returns:

  • (Object)

    the current value of distance



22
23
24
# File 'lib/astro/moon.rb', line 22

def distance
  @distance
end

#illuminationObject

Returns the value of attribute illumination

Returns:

  • (Object)

    the current value of illumination



22
23
24
# File 'lib/astro/moon.rb', line 22

def illumination
  @illumination
end

#phaseObject

Returns the value of attribute phase

Returns:

  • (Object)

    the current value of phase



22
23
24
# File 'lib/astro/moon.rb', line 22

def phase
  @phase
end

#sun_angleObject

Returns the value of attribute sun_angle

Returns:

  • (Object)

    the current value of sun_angle



22
23
24
# File 'lib/astro/moon.rb', line 22

def sun_angle
  @sun_angle
end

#sun_distanceObject

Returns the value of attribute sun_distance

Returns:

  • (Object)

    the current value of sun_distance



22
23
24
# File 'lib/astro/moon.rb', line 22

def sun_distance
  @sun_distance
end