deep-hash-struct 0.1.4 → 0.1.5
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/.gitignore +1 -0
- data/.travis.yml +0 -1
- data/README.md +154 -3
- data/lib/deep/hash/struct/dashboard/table/row.rb +4 -0
- data/lib/deep/hash/struct/dashboard/table/tr.rb +76 -0
- data/lib/deep/hash/struct/dashboard/table.rb +16 -3
- data/lib/deep/hash/struct/pp/dashboard/table/tr.rb +58 -0
- data/lib/deep/hash/struct/pp/wrapper.rb +10 -6
- data/lib/deep/hash/struct/pp.rb +1 -0
- data/lib/deep/hash/struct/version.rb +1 -1
- data/lib/deep/hash/struct/wrapper.rb +43 -26
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c143922bc1bce734facd703fc9b19e2021dbdd5b
|
4
|
+
data.tar.gz: 39a7013a18b621d0a7ea7ce8dd594d3066f5a8bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ede814152eca2d38acaf4e38c80354c020e15fb35d2ebe1f1dec17607bb54eb365fc4da88b6d5407ee12ffa1f10bd29e44c82ba40c65c82aeaa987be4f41ad79
|
7
|
+
data.tar.gz: e13209641d9517afef831137c5762a1f30d042acf8a0d292ebbb4157b63b4e8c2a7041ba64e07f7c1b02ec1c294d950d338f9ec287a1704da6f475b362c1cdc3
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -492,7 +492,7 @@ table = "<table>\n"
|
|
492
492
|
dashboard.tables[0].each do |rows|
|
493
493
|
table << " <tr>\n"
|
494
494
|
rows.each do |row|
|
495
|
-
if row.
|
495
|
+
if row.side_or_header?
|
496
496
|
table << " <th>#{row.name}</th>\n"
|
497
497
|
else
|
498
498
|
table << " <td>#{row.value}</td>\n"
|
@@ -633,7 +633,7 @@ table = "<table>\n"
|
|
633
633
|
dashboard.tables[0].each do |rows|
|
634
634
|
table << " <tr>\n"
|
635
635
|
rows.each do |row|
|
636
|
-
if row.
|
636
|
+
if row.side_or_header?
|
637
637
|
table << " <th>#{row.name}</th>\n"
|
638
638
|
else
|
639
639
|
table << " <td>#{row.value}</td>\n"
|
@@ -770,7 +770,7 @@ table = "<table>\n"
|
|
770
770
|
dashboard.tables[0].each do |rows|
|
771
771
|
table << " <tr>\n"
|
772
772
|
rows.each do |row|
|
773
|
-
if row.
|
773
|
+
if row.side_or_header?
|
774
774
|
table << " <th>#{row.name}</th>\n"
|
775
775
|
else
|
776
776
|
table << " <td>#{row.value}</td>\n"
|
@@ -876,6 +876,157 @@ puts table
|
|
876
876
|
# => </table>
|
877
877
|
```
|
878
878
|
|
879
|
+
### Create like html matrix table
|
880
|
+
```
|
881
|
+
dashboard = Deep::Hash::Struct::Dashboard.new
|
882
|
+
dashboard.add_table(matrix: true) do |t|
|
883
|
+
t.tr do |tr|
|
884
|
+
tr.th "header1"
|
885
|
+
tr.th "header2"
|
886
|
+
tr.th "header3"
|
887
|
+
end
|
888
|
+
|
889
|
+
t.tr side: true do |tr|
|
890
|
+
tr.th "side1"
|
891
|
+
tr.td 1
|
892
|
+
tr.td 2
|
893
|
+
tr.td 3
|
894
|
+
end
|
895
|
+
|
896
|
+
t.tr side: true do |tr|
|
897
|
+
tr.th "side2"
|
898
|
+
tr.td 4
|
899
|
+
tr.td 5
|
900
|
+
tr.td 6
|
901
|
+
end
|
902
|
+
|
903
|
+
t.tr side: true do |tr|
|
904
|
+
tr.th "side3"
|
905
|
+
tr.td 7
|
906
|
+
tr.td 8
|
907
|
+
tr.td 9
|
908
|
+
end
|
909
|
+
end
|
910
|
+
|
911
|
+
result = "<table>\n"
|
912
|
+
dashboard.each do |t|
|
913
|
+
t.each do |tr|
|
914
|
+
result << " <tr>\n"
|
915
|
+
tr.each do |cell|
|
916
|
+
if cell.side_or_header?
|
917
|
+
result << " <th>#{cell.name}</th>"
|
918
|
+
else
|
919
|
+
result << " <td>#{cell.value}</td>"
|
920
|
+
end
|
921
|
+
result << "\n"
|
922
|
+
end
|
923
|
+
result << " </tr>\n"
|
924
|
+
end
|
925
|
+
end
|
926
|
+
result << "</table>\n"
|
927
|
+
|
928
|
+
puts table
|
929
|
+
|
930
|
+
# => <table>
|
931
|
+
# => <tr>
|
932
|
+
# => <th></th>
|
933
|
+
# => <th>header1</th>
|
934
|
+
# => <th>header2</th>
|
935
|
+
# => <th>header3</th>
|
936
|
+
# => </tr>
|
937
|
+
# => <tr>
|
938
|
+
# => <th>side1</th>
|
939
|
+
# => <td>1</td>
|
940
|
+
# => <td>2</td>
|
941
|
+
# => <td>3</td>
|
942
|
+
# => </tr>
|
943
|
+
# => <tr>
|
944
|
+
# => <th>side2</th>
|
945
|
+
# => <td>4</td>
|
946
|
+
# => <td>5</td>
|
947
|
+
# => <td>6</td>
|
948
|
+
# => </tr>
|
949
|
+
# => <tr>
|
950
|
+
# => <th>side3</th>
|
951
|
+
# => <td>7</td>
|
952
|
+
# => <td>8</td>
|
953
|
+
# => <td>9</td>
|
954
|
+
# => </tr>
|
955
|
+
# => </table>
|
956
|
+
```
|
957
|
+
|
958
|
+
### Create like html segment table
|
959
|
+
```
|
960
|
+
dashboard = Deep::Hash::Struct::Dashboard.new
|
961
|
+
dashboard.add_table do |t|
|
962
|
+
t.tr do |tr|
|
963
|
+
tr.th "header1"
|
964
|
+
tr.th "header2"
|
965
|
+
tr.th "header3"
|
966
|
+
end
|
967
|
+
|
968
|
+
t.tr do |tr|
|
969
|
+
tr.td 1
|
970
|
+
tr.td 2
|
971
|
+
tr.td 3
|
972
|
+
end
|
973
|
+
|
974
|
+
t.tr do |tr|
|
975
|
+
tr.td 4
|
976
|
+
tr.td 5
|
977
|
+
tr.td 6
|
978
|
+
end
|
979
|
+
|
980
|
+
t.tr do |tr|
|
981
|
+
tr.td 7
|
982
|
+
tr.td 8
|
983
|
+
tr.td 9
|
984
|
+
end
|
985
|
+
end
|
986
|
+
|
987
|
+
result = "<table>\n"
|
988
|
+
dashboard.each do |t|
|
989
|
+
t.each do |tr|
|
990
|
+
result << " <tr>\n"
|
991
|
+
tr.each do |cell|
|
992
|
+
if cell.side_or_header?
|
993
|
+
result << " <th>#{cell.name}</th>"
|
994
|
+
else
|
995
|
+
result << " <td>#{cell.value}</td>"
|
996
|
+
end
|
997
|
+
result << "\n"
|
998
|
+
end
|
999
|
+
result << " </tr>\n"
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
result << "</table>\n"
|
1003
|
+
|
1004
|
+
puts table
|
1005
|
+
|
1006
|
+
# => <table>
|
1007
|
+
# => <tr>
|
1008
|
+
# => <th>header1</th>
|
1009
|
+
# => <th>header2</th>
|
1010
|
+
# => <th>header3</th>
|
1011
|
+
# => </tr>
|
1012
|
+
# => <tr>
|
1013
|
+
# => <td>1</td>
|
1014
|
+
# => <td>2</td>
|
1015
|
+
# => <td>3</td>
|
1016
|
+
# => </tr>
|
1017
|
+
# => <tr>
|
1018
|
+
# => <td>4</td>
|
1019
|
+
# => <td>5</td>
|
1020
|
+
# => <td>6</td>
|
1021
|
+
# => </tr>
|
1022
|
+
# => <tr>
|
1023
|
+
# => <td>7</td>
|
1024
|
+
# => <td>8</td>
|
1025
|
+
# => <td>9</td>
|
1026
|
+
# => </tr>
|
1027
|
+
# => </table>
|
1028
|
+
```
|
1029
|
+
|
879
1030
|
## Contributing
|
880
1031
|
|
881
1032
|
Bug reports and pull requests are welcome on GitHub at https://github.com/etiopiamokamame/deep-hash-struct. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -0,0 +1,76 @@
|
|
1
|
+
module Deep
|
2
|
+
module Hash
|
3
|
+
module Struct
|
4
|
+
class Dashboard
|
5
|
+
class Table
|
6
|
+
class Tr
|
7
|
+
include PP::Dashboard::Table::Tr
|
8
|
+
|
9
|
+
attr_accessor :header, :body, :side, :options
|
10
|
+
|
11
|
+
def initialize(header, body, side, options = {})
|
12
|
+
@header = header
|
13
|
+
@body = body
|
14
|
+
@side = side
|
15
|
+
@options = options
|
16
|
+
end
|
17
|
+
|
18
|
+
def th(value = nil)
|
19
|
+
hash = {}
|
20
|
+
if !value.is_a?(Array) && value.respond_to?(:each)
|
21
|
+
if value.has_key?(:key) && value.has_key?(:value)
|
22
|
+
hash[value[:key]] = value[:value]
|
23
|
+
else
|
24
|
+
value.each do |k, v|
|
25
|
+
hash[k] = v
|
26
|
+
end
|
27
|
+
end
|
28
|
+
else
|
29
|
+
i = if options[:side]
|
30
|
+
side.count + 1
|
31
|
+
elsif options[:matrix]
|
32
|
+
header.count
|
33
|
+
else
|
34
|
+
header.count + 1
|
35
|
+
end
|
36
|
+
hash["key_#{i}"] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
if options[:side]
|
40
|
+
side.merge! hash
|
41
|
+
else
|
42
|
+
header.merge! hash
|
43
|
+
end
|
44
|
+
|
45
|
+
value
|
46
|
+
end
|
47
|
+
|
48
|
+
def td(value = nil)
|
49
|
+
hash = {}
|
50
|
+
if !value.is_a?(Array) && value.respond_to?(:each)
|
51
|
+
if value.has_key?(:key) && value.has_key?(:value)
|
52
|
+
hash[value[:key]] = value[:value]
|
53
|
+
else
|
54
|
+
value.each do |k, v|
|
55
|
+
hash[k] = v
|
56
|
+
end
|
57
|
+
end
|
58
|
+
else
|
59
|
+
i = body.count + 1
|
60
|
+
hash["key_#{i}"] = value
|
61
|
+
end
|
62
|
+
|
63
|
+
if options[:side]
|
64
|
+
hash.each do |k, v|
|
65
|
+
body[k][side.keys[options[:b_index]]] = v
|
66
|
+
end
|
67
|
+
else
|
68
|
+
body.merge! hash
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "deep/hash/struct/dashboard/table/row"
|
2
|
+
require "deep/hash/struct/dashboard/table/tr"
|
2
3
|
|
3
4
|
module Deep
|
4
5
|
module Hash
|
@@ -55,9 +56,10 @@ module Deep
|
|
55
56
|
end
|
56
57
|
|
57
58
|
self.bodies = if matrix?
|
58
|
-
|
59
|
+
bs = Wrapper.new
|
60
|
+
|
59
61
|
body.size.times do
|
60
|
-
bs.
|
62
|
+
bs.deep_merge! body.shift
|
61
63
|
end
|
62
64
|
|
63
65
|
sides.map do |s|
|
@@ -65,7 +67,7 @@ module Deep
|
|
65
67
|
rs << s
|
66
68
|
rs += headers.map do |h|
|
67
69
|
next if h.side_header?
|
68
|
-
v =
|
70
|
+
v = bs.to_h.dig(h.value, s.value)
|
69
71
|
v = v.nil? ? opt[:default] : v
|
70
72
|
Row.new(value: v)
|
71
73
|
end.compact
|
@@ -106,6 +108,17 @@ module Deep
|
|
106
108
|
end
|
107
109
|
alias collect map
|
108
110
|
|
111
|
+
def tr(options = {})
|
112
|
+
b = Wrapper.new
|
113
|
+
opt[:side] = options[:side] || false
|
114
|
+
opt[:matrix] = matrix?
|
115
|
+
opt[:b_index] = body.size
|
116
|
+
|
117
|
+
yield Tr.new(header, b, side, opt)
|
118
|
+
body << b unless b.count.zero?
|
119
|
+
self
|
120
|
+
end
|
121
|
+
|
109
122
|
private
|
110
123
|
|
111
124
|
def default_options
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module Deep
|
2
|
+
module Hash
|
3
|
+
module Struct
|
4
|
+
module PP
|
5
|
+
module Dashboard
|
6
|
+
module Table
|
7
|
+
module Tr
|
8
|
+
def inspect
|
9
|
+
attributes = []
|
10
|
+
attributes << "header=#{header}" if header.present?
|
11
|
+
attributes << "side=#{side}" if side.present?
|
12
|
+
attributes << "body=#{body}" if body.size > 0
|
13
|
+
attributes << "options=#{options}"
|
14
|
+
attributes = "#{attributes.size.zero? ? '' : ' '}#{attributes.join(' ')}"
|
15
|
+
"#<#{self.class.name.split("::").last}#{attributes}>"
|
16
|
+
end
|
17
|
+
|
18
|
+
def pretty_print(q)
|
19
|
+
q.group(2, "#(#{self.class.name}:#{sprintf("0x%x", object_id)} {", "})") do
|
20
|
+
q.breakable
|
21
|
+
|
22
|
+
if header.present?
|
23
|
+
q.text ":header => "
|
24
|
+
q.pp header
|
25
|
+
q.breakable
|
26
|
+
end
|
27
|
+
|
28
|
+
if side.present?
|
29
|
+
q.text ":side => "
|
30
|
+
q.pp side
|
31
|
+
q.breakable
|
32
|
+
end
|
33
|
+
|
34
|
+
if body.size > 0
|
35
|
+
q.text ":body => "
|
36
|
+
q.pp body
|
37
|
+
q.breakable
|
38
|
+
end
|
39
|
+
|
40
|
+
q.group(2, ":options => {", "}") do
|
41
|
+
q.breakable
|
42
|
+
q.seplist(options) do |k, v|
|
43
|
+
q.text ":#{k} => "
|
44
|
+
q.pp v
|
45
|
+
end
|
46
|
+
q.breakable
|
47
|
+
end
|
48
|
+
|
49
|
+
q.breakable
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -9,15 +9,19 @@ module Deep
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def pretty_print(q)
|
12
|
-
|
13
|
-
q.
|
12
|
+
if present?
|
13
|
+
q.group(2, "#(#{self.class.name}:#{sprintf("0x%x", object_id)} {", "})") do
|
14
|
+
q.breakable
|
15
|
+
|
16
|
+
q.group(2, "{", "}") do
|
17
|
+
q.breakable
|
18
|
+
pretty_print_cycle(q)
|
19
|
+
end
|
14
20
|
|
15
|
-
q.group(2, "{", "}") do
|
16
21
|
q.breakable
|
17
|
-
pretty_print_cycle(q)
|
18
22
|
end
|
19
|
-
|
20
|
-
q.
|
23
|
+
else
|
24
|
+
q.text "#(#{self.class.name}:#{sprintf("0x%x", object_id)})"
|
21
25
|
end
|
22
26
|
end
|
23
27
|
|
data/lib/deep/hash/struct/pp.rb
CHANGED
@@ -4,7 +4,8 @@ module Deep
|
|
4
4
|
class Wrapper
|
5
5
|
include PP::Wrapper
|
6
6
|
|
7
|
-
attr_accessor :
|
7
|
+
attr_accessor :keys,
|
8
|
+
:parent_ins,
|
8
9
|
:parent_key,
|
9
10
|
:chain
|
10
11
|
|
@@ -13,6 +14,7 @@ module Deep
|
|
13
14
|
alias chain? chain
|
14
15
|
|
15
16
|
def initialize(h = {}, opt = {})
|
17
|
+
self.keys = []
|
16
18
|
self.chain = opt[:chain].nil? ? false : opt[:chain]
|
17
19
|
self.parent_ins = opt[:parent_ins]
|
18
20
|
self.parent_key = opt[:parent_key]
|
@@ -20,12 +22,6 @@ module Deep
|
|
20
22
|
wrap h, self
|
21
23
|
end
|
22
24
|
|
23
|
-
def keys
|
24
|
-
instance_variables.reject { |k| k =~ /default|parent_ins|parent_key|chain/ }.map do |k|
|
25
|
-
k.to_s[1..-1].to_sym
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
25
|
def values
|
30
26
|
keys.map do |k|
|
31
27
|
self[k]
|
@@ -274,15 +270,20 @@ module Deep
|
|
274
270
|
end
|
275
271
|
|
276
272
|
def delete(k)
|
273
|
+
keys.delete k.to_sym
|
277
274
|
remove_instance_variable "@#{k}"
|
278
275
|
end
|
279
276
|
|
280
277
|
def delete_if
|
281
|
-
|
282
|
-
|
278
|
+
del_keys = map do |k, v|
|
279
|
+
k if yield(k, v)
|
280
|
+
end.compact
|
281
|
+
del_keys.each do |k|
|
282
|
+
delete k
|
283
283
|
end
|
284
284
|
self
|
285
285
|
end
|
286
|
+
alias reject! delete_if
|
286
287
|
|
287
288
|
def find
|
288
289
|
klass = self.class.new
|
@@ -318,13 +319,6 @@ module Deep
|
|
318
319
|
klass
|
319
320
|
end
|
320
321
|
|
321
|
-
def reject!
|
322
|
-
each do |k, v|
|
323
|
-
remove_instance_variable "@#{k}" if yield(k, v)
|
324
|
-
end
|
325
|
-
self
|
326
|
-
end
|
327
|
-
|
328
322
|
def inject(init = 0)
|
329
323
|
value = [Float, Fixnum].include?(init.class) ? init : init.dup
|
330
324
|
each do |k, v|
|
@@ -337,10 +331,14 @@ module Deep
|
|
337
331
|
alias reduce inject
|
338
332
|
|
339
333
|
def clear
|
340
|
-
|
334
|
+
unless default.nil?
|
335
|
+
remove_instance_variable "@default"
|
336
|
+
keys.delete :default
|
337
|
+
end
|
341
338
|
each_key do |k|
|
342
339
|
remove_instance_variable "@#{k}"
|
343
340
|
end
|
341
|
+
self.keys = []
|
344
342
|
self
|
345
343
|
end
|
346
344
|
|
@@ -384,7 +382,7 @@ module Deep
|
|
384
382
|
end
|
385
383
|
|
386
384
|
def shift
|
387
|
-
k = keys.
|
385
|
+
k = keys.shift
|
388
386
|
[k, remove_instance_variable("@#{k}")]
|
389
387
|
end
|
390
388
|
|
@@ -397,7 +395,7 @@ module Deep
|
|
397
395
|
klass = dup
|
398
396
|
|
399
397
|
klass.each do |k, v|
|
400
|
-
klass.
|
398
|
+
klass.delete(k) if (v.class == self.class && v.blank?) || v.nil?
|
401
399
|
end
|
402
400
|
|
403
401
|
klass
|
@@ -405,7 +403,7 @@ module Deep
|
|
405
403
|
|
406
404
|
def compact!
|
407
405
|
each do |k, v|
|
408
|
-
|
406
|
+
delete(k) if (v.class == self.class && v.blank?) || v.nil?
|
409
407
|
end
|
410
408
|
|
411
409
|
self
|
@@ -414,7 +412,7 @@ module Deep
|
|
414
412
|
def deep_compact
|
415
413
|
klass = deep_dup
|
416
414
|
|
417
|
-
klass.
|
415
|
+
del_keys = klass.map do |k, v|
|
418
416
|
flag = if v.class == self.class
|
419
417
|
klass[k] = v.deep_compact
|
420
418
|
klass[k].present?
|
@@ -422,14 +420,18 @@ module Deep
|
|
422
420
|
!v.nil?
|
423
421
|
end
|
424
422
|
next if flag
|
425
|
-
|
423
|
+
k
|
424
|
+
end.compact
|
425
|
+
|
426
|
+
del_keys.each do |k|
|
427
|
+
klass.delete k
|
426
428
|
end
|
427
429
|
|
428
430
|
klass
|
429
431
|
end
|
430
432
|
|
431
433
|
def deep_compact!
|
432
|
-
|
434
|
+
del_keys = map do |k, v|
|
433
435
|
flag = if v.class == self.class
|
434
436
|
self[k] = v.deep_compact
|
435
437
|
self[k].present?
|
@@ -437,7 +439,11 @@ module Deep
|
|
437
439
|
!v.nil?
|
438
440
|
end
|
439
441
|
next if flag
|
440
|
-
|
442
|
+
k
|
443
|
+
end.compact
|
444
|
+
|
445
|
+
del_keys.each do |k|
|
446
|
+
delete k
|
441
447
|
end
|
442
448
|
|
443
449
|
self
|
@@ -454,8 +460,12 @@ module Deep
|
|
454
460
|
end
|
455
461
|
|
456
462
|
def slice!(*syms)
|
457
|
-
|
458
|
-
|
463
|
+
del_keys = keys.map do |k|
|
464
|
+
k unless syms.map(&:to_sym).include?(k)
|
465
|
+
end.compact
|
466
|
+
|
467
|
+
del_keys.each do |k|
|
468
|
+
delete k
|
459
469
|
end
|
460
470
|
|
461
471
|
self
|
@@ -503,6 +513,10 @@ module Deep
|
|
503
513
|
end
|
504
514
|
end
|
505
515
|
|
516
|
+
def dup
|
517
|
+
self.class.new(to_h)
|
518
|
+
end
|
519
|
+
|
506
520
|
def deep_dup(klass = self)
|
507
521
|
new_klass = self.class.new
|
508
522
|
|
@@ -520,8 +534,10 @@ module Deep
|
|
520
534
|
|
521
535
|
if method_name.to_s.end_with? "="
|
522
536
|
setting_chain_instance!(self, name, arg)
|
537
|
+
keys << name.to_sym unless keys.include?(name.to_sym)
|
523
538
|
elsif block_given?
|
524
539
|
__send__ "#{name}=", yield
|
540
|
+
keys << name.to_sym unless keys.include?(name.to_sym)
|
525
541
|
else
|
526
542
|
val = instance_variable_get "@#{name}"
|
527
543
|
return val unless val.nil?
|
@@ -539,6 +555,7 @@ module Deep
|
|
539
555
|
|
540
556
|
def setting_chain_instance!(klass, key, val)
|
541
557
|
klass.instance_variable_set "@#{key}", hash?(val) && (!(self === val.class) || klass.chain?) ? wrap(val) : val
|
558
|
+
klass.keys << key.to_sym unless klass.keys.include?(key.to_sym)
|
542
559
|
return val unless klass.chain?
|
543
560
|
setting_chain_instance!(klass.parent_ins, klass.parent_key, klass)
|
544
561
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep-hash-struct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- adachi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,11 +74,13 @@ files:
|
|
74
74
|
- lib/deep/hash/struct/dashboard.rb
|
75
75
|
- lib/deep/hash/struct/dashboard/table.rb
|
76
76
|
- lib/deep/hash/struct/dashboard/table/row.rb
|
77
|
+
- lib/deep/hash/struct/dashboard/table/tr.rb
|
77
78
|
- lib/deep/hash/struct/error.rb
|
78
79
|
- lib/deep/hash/struct/pp.rb
|
79
80
|
- lib/deep/hash/struct/pp/dashboard.rb
|
80
81
|
- lib/deep/hash/struct/pp/dashboard/table.rb
|
81
82
|
- lib/deep/hash/struct/pp/dashboard/table/row.rb
|
83
|
+
- lib/deep/hash/struct/pp/dashboard/table/tr.rb
|
82
84
|
- lib/deep/hash/struct/pp/wrapper.rb
|
83
85
|
- lib/deep/hash/struct/version.rb
|
84
86
|
- lib/deep/hash/struct/wrapper.rb
|