time_distribution 2.0.1 → 2.0.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 906063f479403bf2f723d670086c78e6707666d7
|
4
|
+
data.tar.gz: 185834218fe90c896548fb965e070b768704d74a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e558b20fb24adb178b18c33690c640e77ec8925374a55d0a1088dee5eaa29d027ba08f199c9613bf53f60897f205d15efbd9cef9584e6fda8befba34abd7a3a2
|
7
|
+
data.tar.gz: ea5f6468b2995476bf196dbf0f16305a8651c4c704a25edef0161976354d83870635858979f281b79c71dd832444125201b2e71a25900cf8e0d7a656b224d943
|
@@ -15,7 +15,7 @@ module TimeDistribution
|
|
15
15
|
private
|
16
16
|
def provide_methods_for_setting_work_days_in_months
|
17
17
|
MONTHS.each do |m|
|
18
|
-
self.class().send(:define_method, "set_official_work_days_in_#{m.to_s}") do |num_days|
|
18
|
+
self.class().send(:define_method, "set_official_work_days_in_#{m.to_s}!") do |num_days|
|
19
19
|
@official_work_days[m] = num_days
|
20
20
|
end
|
21
21
|
end
|
@@ -22,18 +22,18 @@ describe WorkDayCollection do
|
|
22
22
|
november: 0,
|
23
23
|
december: 0
|
24
24
|
})
|
25
|
-
patient.respond_to?(:set_official_work_days_in_january).must_equal true
|
26
|
-
patient.respond_to?(:set_official_work_days_in_february).must_equal true
|
27
|
-
patient.respond_to?(:set_official_work_days_in_march).must_equal true
|
28
|
-
patient.respond_to?(:set_official_work_days_in_april).must_equal true
|
29
|
-
patient.respond_to?(:set_official_work_days_in_may).must_equal true
|
30
|
-
patient.respond_to?(:set_official_work_days_in_june).must_equal true
|
31
|
-
patient.respond_to?(:set_official_work_days_in_july).must_equal true
|
32
|
-
patient.respond_to?(:set_official_work_days_in_august).must_equal true
|
33
|
-
patient.respond_to?(:set_official_work_days_in_september).must_equal true
|
34
|
-
patient.respond_to?(:set_official_work_days_in_october).must_equal true
|
35
|
-
patient.respond_to?(:set_official_work_days_in_november).must_equal true
|
36
|
-
patient.respond_to?(:set_official_work_days_in_december).must_equal true
|
25
|
+
patient.respond_to?(:set_official_work_days_in_january!).must_equal true
|
26
|
+
patient.respond_to?(:set_official_work_days_in_february!).must_equal true
|
27
|
+
patient.respond_to?(:set_official_work_days_in_march!).must_equal true
|
28
|
+
patient.respond_to?(:set_official_work_days_in_april!).must_equal true
|
29
|
+
patient.respond_to?(:set_official_work_days_in_may!).must_equal true
|
30
|
+
patient.respond_to?(:set_official_work_days_in_june!).must_equal true
|
31
|
+
patient.respond_to?(:set_official_work_days_in_july!).must_equal true
|
32
|
+
patient.respond_to?(:set_official_work_days_in_august!).must_equal true
|
33
|
+
patient.respond_to?(:set_official_work_days_in_september!).must_equal true
|
34
|
+
patient.respond_to?(:set_official_work_days_in_october!).must_equal true
|
35
|
+
patient.respond_to?(:set_official_work_days_in_november!).must_equal true
|
36
|
+
patient.respond_to?(:set_official_work_days_in_december!).must_equal true
|
37
37
|
end
|
38
38
|
it 'with days and official work schedule' do
|
39
39
|
x_official_work_days = {
|
@@ -53,18 +53,18 @@ describe WorkDayCollection do
|
|
53
53
|
patient = WorkDayCollection.new('d1', 'd2', official_work_days: x_official_work_days.dup)
|
54
54
|
patient.to_a.must_equal ['d1', 'd2']
|
55
55
|
patient.official_work_days.must_equal x_official_work_days
|
56
|
-
patient.respond_to?(:set_official_work_days_in_january).must_equal true
|
57
|
-
patient.respond_to?(:set_official_work_days_in_february).must_equal true
|
58
|
-
patient.respond_to?(:set_official_work_days_in_march).must_equal true
|
59
|
-
patient.respond_to?(:set_official_work_days_in_april).must_equal true
|
60
|
-
patient.respond_to?(:set_official_work_days_in_may).must_equal true
|
61
|
-
patient.respond_to?(:set_official_work_days_in_june).must_equal true
|
62
|
-
patient.respond_to?(:set_official_work_days_in_july).must_equal true
|
63
|
-
patient.respond_to?(:set_official_work_days_in_august).must_equal true
|
64
|
-
patient.respond_to?(:set_official_work_days_in_september).must_equal true
|
65
|
-
patient.respond_to?(:set_official_work_days_in_october).must_equal true
|
66
|
-
patient.respond_to?(:set_official_work_days_in_november).must_equal true
|
67
|
-
patient.respond_to?(:set_official_work_days_in_december).must_equal true
|
56
|
+
patient.respond_to?(:set_official_work_days_in_january!).must_equal true
|
57
|
+
patient.respond_to?(:set_official_work_days_in_february!).must_equal true
|
58
|
+
patient.respond_to?(:set_official_work_days_in_march!).must_equal true
|
59
|
+
patient.respond_to?(:set_official_work_days_in_april!).must_equal true
|
60
|
+
patient.respond_to?(:set_official_work_days_in_may!).must_equal true
|
61
|
+
patient.respond_to?(:set_official_work_days_in_june!).must_equal true
|
62
|
+
patient.respond_to?(:set_official_work_days_in_july!).must_equal true
|
63
|
+
patient.respond_to?(:set_official_work_days_in_august!).must_equal true
|
64
|
+
patient.respond_to?(:set_official_work_days_in_september!).must_equal true
|
65
|
+
patient.respond_to?(:set_official_work_days_in_october!).must_equal true
|
66
|
+
patient.respond_to?(:set_official_work_days_in_november!).must_equal true
|
67
|
+
patient.respond_to?(:set_official_work_days_in_december!).must_equal true
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|