attribute_struct 0.2.22 → 0.2.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/attribute_struct/attribute_struct.rb +5 -5
- data/lib/attribute_struct/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1851f044804aa76edf2e80c3b6544b947c9f2b0a
|
4
|
+
data.tar.gz: 4034992ed7b20c3bee4f817b3cc3bdceeb8eade1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6402258e7f98e8c8918397441c6aced1e842214a4c1b97ad76b27de92c95b6c3449b42992619d4166e8cc82ff83c4bce36472c4c637079313590083acb1a4744
|
7
|
+
data.tar.gz: 9036ca42dc57baa17bb8489016e0f2f1e630c87ab3aafe697e3086d485afce76ac8045ea45941fdd2e0890fac1849a2ba7d92e5edc9aa35c0c33e90a409b9f87
|
data/CHANGELOG.md
CHANGED
@@ -322,7 +322,7 @@ class AttributeStruct < BasicObject
|
|
322
322
|
hashish.each do |key, value|
|
323
323
|
if(value.is_a?(::Enumerable))
|
324
324
|
flat = value.map do |v|
|
325
|
-
v.is_a?(::Hash) ?
|
325
|
+
v.is_a?(::Hash) ? _klass_new(v) : v
|
326
326
|
end
|
327
327
|
value = value.is_a?(::Hash) ? __hashish[*flat.flatten(1)] : flat
|
328
328
|
end
|
@@ -344,7 +344,7 @@ class AttributeStruct < BasicObject
|
|
344
344
|
source = _deep_copy
|
345
345
|
dest = overlay._deep_copy
|
346
346
|
result = source.deep_merge(dest)
|
347
|
-
|
347
|
+
_klass_new(result)
|
348
348
|
end
|
349
349
|
|
350
350
|
# Perform deep merge in place
|
@@ -427,8 +427,8 @@ class AttributeStruct < BasicObject
|
|
427
427
|
|
428
428
|
# @return [AttributeStruct] new struct instance
|
429
429
|
# @note will set self as parent and propogate camelizing status
|
430
|
-
def _klass_new
|
431
|
-
n = _klass.new
|
430
|
+
def _klass_new(*args, &block)
|
431
|
+
n = _klass.new(*args, &block)
|
432
432
|
unless(_camel_keys_action == :auto_discovery)
|
433
433
|
n._camel_keys_set(_camel_keys_action)
|
434
434
|
end
|
@@ -461,7 +461,7 @@ class AttributeStruct < BasicObject
|
|
461
461
|
# @return [AttributeStruct, NilClass] root of the struct or nil if self is root
|
462
462
|
def _root
|
463
463
|
r = self
|
464
|
-
until(r._parent
|
464
|
+
until(r._parent == nil)
|
465
465
|
r = r._parent
|
466
466
|
end
|
467
467
|
r
|
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.24
|
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-09
|
11
|
+
date: 2015-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Attribute structures
|
14
14
|
email: chrisroberts.code@gmail.com
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
49
|
rubyforge_project:
|
50
|
-
rubygems_version: 2.
|
50
|
+
rubygems_version: 2.4.8
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Attribute structures
|