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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddf72936cbd627a8261e6db0b11a200cdb75e94dc502866dca65b36817d42d32
4
- data.tar.gz: 2c6c8f8a5343dd21ccea4dbab2ce44e75d0ea7d3012d862b75f24cd27edaed08
3
+ metadata.gz: 903e9c9563fc8f410107e95303233b840956eb91ae28f1582d2e30aea627c0a9
4
+ data.tar.gz: 6837229474860fb53ab5253be96dbd51bb1cefa6f376d1c1206a3ff3af834942
5
5
  SHA512:
6
- metadata.gz: 1285076cd8133141b1d711c31bd334e27bca6e1d9942d20e26e390db8b9c646d47b327b3e3107e6e71fc97012d3b8c63c830c6f9fce7d04c0b823efb8da6e00e
7
- data.tar.gz: 0c529556494c63cec393199f74492b0a8a75be8fe48d61abbb4b4c35964e7d68621bcf6b42e09a367bbd6db3cb9ca01006f56399e8e5e1e7ad48ea842b69b977
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
- __attributes_data[name] = value if allow_to_override || __attribute(name)
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:)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Micro
4
4
  module Attributes
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: u-attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura