coligny 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83b182c07b837ff620c95cc2db57116149f8df9a
4
- data.tar.gz: bc66fec6ef419446d106803dfdd033846340dc24
3
+ metadata.gz: 5b696bfbaccc2163a101498e6ce6dd19c1b43785
4
+ data.tar.gz: 7a309578d74d433533f784611247bf831f06694e
5
5
  SHA512:
6
- metadata.gz: fbc644d301b16bf080b7c5a248f6544a41585edc04089a74bae20266288f7511028edb81246698d98342d84951d40fed0b4235fbd6531c9b9baf1ae1e018f70d
7
- data.tar.gz: 6e149ef2afc87f164cb3601024e5ac9ab64c9d8947872670a76df25681337bcdf55f7a74b2839fe2cc635fee5d32208e9f37ac5d20e2c2c56deddb4455661eea
6
+ metadata.gz: 999745bf7a14ddcd05aa763aaabffe7650d1f07fe9fe45771b02acab321b2fb17491be56a1ee0dd2f2a3885f3849de6a09b5b99a98419ea60019afc074a2d119
7
+ data.tar.gz: 26b64bfb3a90cb1a124a2ca6f61a5fc084433e6620d0e1e74d4fff50c5bc488adb55018cd4e380722c092947f84dbff35464cde346b378fa9fcadf74b6db9a65
data/lib/coligny.rb CHANGED
@@ -6,18 +6,21 @@ require "coligny/version"
6
6
  module Coligny
7
7
  require 'date'
8
8
 
9
+ #Adds ColignyMonth object, which has a name and number of days.
9
10
  class ColignyMonth
10
11
  attr_reader :name
11
12
  attr_accessor :days
12
13
 
14
+ #Populate these attributes when the instance of ColignyMonth is created.
13
15
  def initialize(name, days)
14
16
  @name = name
15
17
  @days = days
16
18
  end
17
19
  end
18
20
 
21
+ #Adds ColignyYearClass, which has attributes year, months(an array of ColignyMonth instances) and
19
22
  class ColignyYear
20
- attr_accessor :months, :days
23
+ attr_accessor :months
21
24
  attr_reader :is_early
22
25
 
23
26
  def initialize(year, is_metonic=false)
@@ -82,6 +85,8 @@ module Coligny
82
85
  if @is_early
83
86
  if (year_difference % 5 == 1) || (year_difference % 5 == 0)
84
87
  @months.insert(8, ColignyMonth.new("Equos", 30))
88
+ else
89
+ @months.insert(8, ColignyMonth.new("Equos", 29))
85
90
  end
86
91
  elsif (year_difference % 5 == 0) || (year_difference % 5 == 4)
87
92
  @months.insert(8, ColignyMonth.new("Equos", 30))
@@ -136,8 +141,7 @@ module Coligny
136
141
 
137
142
  def saturn_longcycle_equos_check
138
143
  if (@is_early && saturn_cycle_check(198, 194, 5, 1)) || (!@is_early && saturn_cycle_check(198, 4, 5, 4))
139
- equos = @months.find { |s| s.name == "Equos" }
140
- equos.days = 29
144
+ @months.find { |s| s.name == "Equos" }.days = 29
141
145
  end
142
146
  end
143
147
 
@@ -1,3 +1,3 @@
1
1
  module Coligny
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coligny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Krusen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler