Method: AstroHelper.calc_all_aspects

Defined in:
lib/astro_helper.rb

.calc_all_aspects(planets, opts = {}) ⇒ Object



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/astro_helper.rb', line 231

def calc_all_aspects(planets, opts = {})
  return if planets.size < 2

  p1 = planets.pop
  # $logger.debug( "**** Aspects for #{p1.name}" )
  # $logger.debug( "  with #{planets.map(&:abbr)}" )
  planets.reverse.each do |p2|
    aspects = p1.%(p2, opts)
    next unless aspects.any?

    $logger.debug(aspects.map(&:to_s))
    @aspects += aspects
    # @aspects << [p1.to_sym, p2.to_sym, aspects.inject({}){|m,e| m.merge(e.to_a.last) } ]
  end
  calc_all_aspects(planets, opts)
end