granite 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/granite/assign_data.rb +6 -4
- data/lib/granite/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: 8a6546b162c712c95bf1c954a99143418186c5392548e7a6f767755d7715854c
|
4
|
+
data.tar.gz: 2cd60295ca235be9d5a561f92777a8a7db2920481f33309c93b6730587df14e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89dbff44372428da1723b72f28181880a69428845fd6e0665b981fbb9f13e4323176f1b888f93986f15da104618f2674b01f445f21ca13ce6472595bf26009be
|
7
|
+
data.tar.gz: df01fdaec830de6c86fe291a608e7e32df1feefcfe2e92964b435e95505ffd027705e531f912bc5e7ee2a779a88485c7a9a1c439366a01de1bec6a88eda5a3b8
|
data/lib/granite/assign_data.rb
CHANGED
@@ -24,15 +24,17 @@ module Granite
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
+
protected
|
28
|
+
|
29
|
+
def assign_data
|
30
|
+
data_assignments.each { |assignment| evaluate(assignment.method) if conditions_satisfied?(**assignment.options) }
|
31
|
+
end
|
32
|
+
|
27
33
|
private
|
28
34
|
|
29
35
|
def run_validations!
|
30
36
|
assign_data
|
31
37
|
super
|
32
38
|
end
|
33
|
-
|
34
|
-
def assign_data
|
35
|
-
data_assignments.each { |assignment| evaluate(assignment.method) if conditions_satisfied?(**assignment.options) }
|
36
|
-
end
|
37
39
|
end
|
38
40
|
end
|
data/lib/granite/version.rb
CHANGED