coligny 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/coligny.rb +7 -3
- data/lib/coligny/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b696bfbaccc2163a101498e6ce6dd19c1b43785
|
4
|
+
data.tar.gz: 7a309578d74d433533f784611247bf831f06694e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
140
|
-
equos.days = 29
|
144
|
+
@months.find { |s| s.name == "Equos" }.days = 29
|
141
145
|
end
|
142
146
|
end
|
143
147
|
|
data/lib/coligny/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|