Class: MoonSign
- Inherits:
-
Object
- Object
- MoonSign
- Defined in:
- lib/meteorologist/moon_sign_calculator.rb
Overview
Translated into ruby from www.astrocal.co.uk/apps/moonsign/moon.js
Constant Summary collapse
- OBLIQUITY_BASE =
23.452294
Instance Attribute Summary collapse
-
#sign ⇒ Object
readonly
Returns the value of attribute sign.
Instance Method Summary collapse
- #degree ⇒ Object
-
#initialize(time) ⇒ MoonSign
constructor
A new instance of MoonSign.
- #symbol ⇒ Object
Constructor Details
#initialize(time) ⇒ MoonSign
Returns a new instance of MoonSign.
8 9 10 |
# File 'lib/meteorologist/moon_sign_calculator.rb', line 8 def initialize(time) @sign = calculate_sign(time) end |
Instance Attribute Details
#sign ⇒ Object (readonly)
Returns the value of attribute sign.
4 5 6 |
# File 'lib/meteorologist/moon_sign_calculator.rb', line 4 def sign @sign end |
Instance Method Details
#degree ⇒ Object
16 17 18 |
# File 'lib/meteorologist/moon_sign_calculator.rb', line 16 def degree @degree # set in #calculate_sign end |
#symbol ⇒ Object
12 13 14 |
# File 'lib/meteorologist/moon_sign_calculator.rb', line 12 def symbol symbol_map[sign] end |