roi_calculator 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/lib/roi/rentability_periods.rb +8 -1
- data/lib/roi/version.rb +1 -1
- 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: 28fdc603ec087be038354ae4b2598066e254839306da2ae5e3ce1f9b9c949c93
|
4
|
+
data.tar.gz: 3d87f3a27f6b55acc5145cdd6ab1700ab145f338ff31dc695972254816553905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3b8f264709e29e71dfccb3fcd1b17e7c88eb363185adf7a8e5d48f573b8e4b7d924e36795ff0988e8953a2b7591ce981ff59c624ad1e1031e2eb24913c5bd6
|
7
|
+
data.tar.gz: 6358ee37541ea90a0c39134be3134d7ac996dfc50309d82084f19ccaaff4a6deef3cc7e43667b992b4a493a4f48dfdebaaafa679fc35df2a1a5edec4a8871cd2
|
data/Gemfile
CHANGED
@@ -12,13 +12,20 @@ module ROI
|
|
12
12
|
check_gaps_and_format(adjust_start_date(scoped_start), end_date)
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def month(date = end_date)
|
16
|
+
scoped_start = WorkDay.last_until((date - 1.month).end_of_month)
|
17
|
+
scoped_end = adjust_end_date(date)
|
18
|
+
check_gaps_and_format(scoped_start, scoped_end)
|
19
|
+
end
|
20
|
+
|
21
|
+
def months_ago(amount, date = end_date)
|
16
22
|
return current_month if amount == 1 && date == end_date
|
17
23
|
|
18
24
|
scoped_start = WorkDay.last_until((date - (amount+1).month).end_of_month)
|
19
25
|
scoped_end = adjust_end_date((date - 1.month).end_of_month)
|
20
26
|
check_gaps_and_format(scoped_start, scoped_end)
|
21
27
|
end
|
28
|
+
alias_method :months, :months_ago
|
22
29
|
|
23
30
|
def current_year
|
24
31
|
scoped_start = WorkDay.last_until((end_date - 1.year).end_of_year)
|
data/lib/roi/version.rb
CHANGED