Class: Coligny::ColignyYear

Inherits:
Object
  • Object
show all
Defined in:
lib/coligny.rb

Overview

Adds ColignyYearClass, which has attributes year, months(an array of ColignyMonth instances) and

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(year, is_metonic = false) ⇒ ColignyYear

Returns a new instance of ColignyYear.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/coligny.rb', line 26

def initialize(year, is_metonic=false)
  @is_metonic = is_metonic
  @year = year    
  @months = [ColignyMonth.new("Samonios", 30), 
             ColignyMonth.new("Dumanios", 29), 
             ColignyMonth.new("Riuros", 30), 
             ColignyMonth.new("Anagantios", 29), 
             ColignyMonth.new("Ogronios", 30),
             ColignyMonth.new("Cutios", 30),
             ColignyMonth.new("Giamonios", 29),
             ColignyMonth.new("Simiuisonna", 30),
             ColignyMonth.new("Elembi", 29),
             ColignyMonth.new("Aedrinni", 30),
             ColignyMonth.new("Cantlos", 29)]
  
  is_early?
  
  if !is_metonic           
    populate_saturn_months  
  else
    populate_metonic_months
  end  
end

Instance Attribute Details

#is_earlyObject (readonly)

Returns the value of attribute is_early.



24
25
26
# File 'lib/coligny.rb', line 24

def is_early
  @is_early
end

#monthsObject

Returns the value of attribute months.



23
24
25
# File 'lib/coligny.rb', line 23

def months
  @months
end