Class: Astroscript::ConstBody
- Defined in:
- lib/astroscript/body/const_body.rb
Defined Under Namespace
Classes: NullCalc
Constant Summary
Constants inherited from Body
Body::ANGLES, Body::AVG_VELOCITY, Body::MAX_VELOCITY, Body::ORBS, Body::SPEED_ORDER, Body::STATIONARY_VELOCITY
Instance Attribute Summary collapse
-
#lon ⇒ Object
(also: #degree)
Returns the value of attribute lon.
-
#name ⇒ Object
Returns the value of attribute name.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
Attributes inherited from Body
#abbr, #altitude, #antipode, #azimuth, #calc, #decl, #distance, #harmonic, #hdist, #hlat, #hlon, #hvel, #lat, #ra, #velocity
Instance Method Summary collapse
- #calculate! ⇒ Object
-
#initialize(deg, name, symbol = nil, abbr = nil) ⇒ ConstBody
constructor
A new instance of ConstBody.
- #to_sym ⇒ Object
Methods inherited from Body
#*, #==, #closer_to_sun?, #decan, #distance_to_sun, #duad, #dwad, #element, #element_sym, #feminine?, #flip, #flip!, #gate, #handle, #harmonic_sign, #harmonic_signs, #harmonize, #harmonize!, #house, #in_detriment?, #in_domicile?, #in_exaltation?, #in_fall?, #inner?, #inspect, #is_angle?, #luminary?, #masculine?, #meridian_degree, #midpoint?, #modality, #navamsha, #outer?, #pentan, #personal_angle?, phase, #prefix, #prime_degree, #print, #radix, #relative_velocity, #retrograde?, #ruler, #sign, #sign_and_house, #sign_i, #sign_sym, #speed_order, #stationary?, #subduad, #subdwad, #subpentan, #to_dms, #to_json, #to_s, #transit!, #transit?, #triple_harmonic_signs, #yang?, #yin?
Constructor Details
#initialize(deg, name, symbol = nil, abbr = nil) ⇒ ConstBody
Returns a new instance of ConstBody.
7 8 9 10 11 12 13 14 |
# File 'lib/astroscript/body/const_body.rb', line 7 def initialize(deg, name, symbol = nil, abbr = nil) @lon = deg @name = name @harmonic = 1 @abbr = abbr || name[0..1].upcase.to_sym @symbol = symbol || @abbr @calc = NullCalc.new(@lon) end |
Instance Attribute Details
#lon ⇒ Object Also known as: degree
Returns the value of attribute lon.
5 6 7 |
# File 'lib/astroscript/body/const_body.rb', line 5 def lon @lon end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/astroscript/body/const_body.rb', line 5 def name @name end |
#symbol ⇒ Object
Returns the value of attribute symbol.
5 6 7 |
# File 'lib/astroscript/body/const_body.rb', line 5 def symbol @symbol end |
Instance Method Details
#calculate! ⇒ Object
20 21 22 |
# File 'lib/astroscript/body/const_body.rb', line 20 def calculate! nil end |
#to_sym ⇒ Object
16 17 18 |
# File 'lib/astroscript/body/const_body.rb', line 16 def to_sym @abbr end |