u-attributes 0.6.0 → 0.6.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/micro/attributes/macros.rb +3 -5
- data/lib/micro/attributes/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: 903e9c9563fc8f410107e95303233b840956eb91ae28f1582d2e30aea627c0a9
|
4
|
+
data.tar.gz: 6837229474860fb53ab5253be96dbd51bb1cefa6f376d1c1206a3ff3af834942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79f7094cb6d9f0e216725d1ccce60d616624d0537f08b9bbaec63c9dade0fd3439b814fd8b92764ef39688b2ecbc90c44920f54b56ef0086ed375f315f13f889
|
7
|
+
data.tar.gz: 8a1ef62eba6ac5639d5427b2b375b4a9c4ceffb7d8e465d2ec62f37b66a54033c799a813935b7b457f8c9b899b61ed99e5c34c99009532e9563729e6d27b24d7
|
@@ -12,12 +12,8 @@ module Micro
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def __attribute(name)
|
15
|
-
return false if attribute?(name)
|
16
|
-
|
17
15
|
__attributes.add(name)
|
18
16
|
attr_reader(name)
|
19
|
-
|
20
|
-
return true
|
21
17
|
end
|
22
18
|
|
23
19
|
def __attributes_data
|
@@ -25,7 +21,9 @@ module Micro
|
|
25
21
|
end
|
26
22
|
|
27
23
|
def __attribute_data(name, value, allow_to_override)
|
28
|
-
|
24
|
+
has_attribute = attribute?(name)
|
25
|
+
__attribute(name) unless has_attribute
|
26
|
+
__attributes_data[name] = value if allow_to_override || !has_attribute
|
29
27
|
end
|
30
28
|
|
31
29
|
def __attribute_data!(arg, allow_to_override:)
|