sinatra-hexacta 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/extensions/antiquity.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b09731f11bb84a5c0cdf375704854f8221af4551f0b19a2215c2c6501695f1f
|
4
|
+
data.tar.gz: f303c526ff69d7e2c1d077842807c5c2efe6961262d23d821d34cb020c30024f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ab7ed10ae230ba1ea869c047ff81f49eae1f3b5cc51916848cf40ee97ac3a34d38fe6ee33f90b5f1130a933842022f446bfa835d01be7adf3b8a6a0d872716a
|
7
|
+
data.tar.gz: 4625603c05c8ec901ff9fd8e183cbf9691a2b6f501902c2cefdbd1ec346000593e26c398aeee49cea683fd866072f23f5c569c3d70dcf0d9d6101696ec088352
|
@@ -17,8 +17,8 @@ class Antiquity
|
|
17
17
|
months.divmod(12).first
|
18
18
|
end
|
19
19
|
|
20
|
-
def to_s
|
21
|
-
date = (@periods.last && @periods.last.end_date) ||
|
20
|
+
def to_s(upto_date=Date.today)
|
21
|
+
date = (@periods.last && @periods.last.end_date) || upto_date
|
22
22
|
result = ""
|
23
23
|
return result if @periods.empty?
|
24
24
|
if date >= @periods.first.start_date
|