Class: Coligny::ColignyYear
- Inherits:
-
Object
- Object
- Coligny::ColignyYear
- Defined in:
- lib/coligny.rb
Overview
Adds ColignyYearClass, which has attributes year, months(an array of ColignyMonth instances) and
Instance Attribute Summary collapse
-
#is_early ⇒ Object
readonly
Returns the value of attribute is_early.
-
#months ⇒ Object
Returns the value of attribute months.
Instance Method Summary collapse
-
#initialize(year, is_metonic = false) ⇒ ColignyYear
constructor
A new instance of ColignyYear.
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_early ⇒ Object (readonly)
Returns the value of attribute is_early.
24 25 26 |
# File 'lib/coligny.rb', line 24 def is_early @is_early end |
#months ⇒ Object
Returns the value of attribute months.
23 24 25 |
# File 'lib/coligny.rb', line 23 def months @months end |