Class: Astroscript::ConstBody

Inherits:
Body
  • Object
show all
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

Attributes inherited from Body

#abbr, #altitude, #antipode, #azimuth, #calc, #decl, #distance, #harmonic, #hdist, #hlat, #hlon, #hvel, #lat, #ra, #velocity

Instance Method Summary collapse

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

#lonObject 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

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/astroscript/body/const_body.rb', line 5

def name
  @name
end

#symbolObject

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_symObject



16
17
18
# File 'lib/astroscript/body/const_body.rb', line 16

def to_sym
  @abbr
end