time_distribution 2.1.0 → 2.1.1
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/time_distribution/version.rb +1 -1
- data/lib/time_distribution/work_day_collection.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bc7bb856bfde62758faa48f53bde0e6340ecfc6
|
4
|
+
data.tar.gz: d82cf1850876b336bde67cc29b0bf1f29fd033fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6cfb3c17016e0fd6047b973d187c6c1e3f46c5242d7cc2249851e4f2d2245bbcc405ef324799de4f3c5b022f6f270d660264525070b6943fde002bfea2a681f
|
7
|
+
data.tar.gz: bcd3854b1ea7856fa8dfd0279ceaddf983a73ce87f2f9dcdd931b8802487aba09a849908dfd7397535126403b17aea690875f22f4c0a402584844f4bab9bdf14
|
@@ -136,9 +136,13 @@ module TimeDistribution
|
|
136
136
|
hours = []
|
137
137
|
week = 1
|
138
138
|
work_days_by_weeks do |week_collection|
|
139
|
+
subjects_this_week = week_collection.subjects
|
140
|
+
unless task_types.empty?
|
141
|
+
subjects_this_week &= task_types
|
142
|
+
end
|
139
143
|
string += (
|
140
144
|
"# #{week_collection.first.date.strftime('%b %-d, %Y')}\n" +
|
141
|
-
"# #{
|
145
|
+
"# #{subjects_this_week.join(', ')}\n"
|
142
146
|
)
|
143
147
|
week_hours = week_collection.map do |day|
|
144
148
|
day.to_hours(*task_types)
|