attribute_struct 0.2.26 → 0.2.28
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/CHANGELOG.md +3 -0
- data/lib/attribute_struct/attribute_struct.rb +3 -1
- data/lib/attribute_struct/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41547b7309813fb1da48c6e17e0d063215d08963
|
|
4
|
+
data.tar.gz: 9ebfd315aab3eecc4a92d6a08c3276bddd9538ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb2c29323b1d75a607f097d49e79e5f91649810ae7c066651c09cd890fbe6c0c0266df29930d16c8f8cd5887345dcb9169064cbeb3145d129ca6742590c7194f
|
|
7
|
+
data.tar.gz: bfd1e337210551aea3a1c090ba09b84431b44a1f90d0eaa88d6e25fbfa4412289b6af1400dfb95cb255661d5e17ab3154c0c0f06bc584086bd127da4444e30ab
|
data/CHANGELOG.md
CHANGED
|
@@ -207,6 +207,7 @@ class AttributeStruct < BasicObject
|
|
|
207
207
|
base = _klass_new
|
|
208
208
|
end
|
|
209
209
|
end
|
|
210
|
+
@table[sym] = base
|
|
210
211
|
if(block.arity == 0)
|
|
211
212
|
base.instance_exec(&block)
|
|
212
213
|
else
|
|
@@ -227,6 +228,8 @@ class AttributeStruct < BasicObject
|
|
|
227
228
|
end
|
|
228
229
|
elsif(!args.empty? && block)
|
|
229
230
|
result = leaf = base = @table.fetch(sym, _klass_new)
|
|
231
|
+
@table[sym] = result
|
|
232
|
+
|
|
230
233
|
args.flatten.each do |arg|
|
|
231
234
|
leaf = base[arg]
|
|
232
235
|
unless(leaf.is_a?(_klass))
|
|
@@ -248,7 +251,6 @@ class AttributeStruct < BasicObject
|
|
|
248
251
|
else
|
|
249
252
|
orig = leaf
|
|
250
253
|
end
|
|
251
|
-
@table[sym] = result
|
|
252
254
|
else
|
|
253
255
|
if(args.size > 1 && args.all?{|i| i.is_a?(::String) || i.is_a?(::Symbol)} && !_state(:value_collapse))
|
|
254
256
|
@table[sym] = _klass_new unless @table[sym].is_a?(_klass)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: attribute_struct
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.28
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Roberts
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bogo
|