Sha256: 14f0b6df5d485f08f98728d40304894b9578b60e1bbb410e247f57b033c5d46d
Contents?: true
Size: 1.67 KB
Versions: 1
Compression:
Stored size: 1.67 KB
Contents
#### Nested Hashes This example shows nested hashes. ```show.rb```: ```ruby require 'debug_helper' hash = { :a => { :b => 0, :c => 1, }, :d => { :e => 2, :f => 3, } } DebugHelper.show(hash, 'My nested hash') ``` The output shows details of the hashes. ```show.yaml```: ```yaml --- Hash (message='My nested hash'): Hash#size: 2 Hash#default: Hash#default_proc: Pair 0: Key: Symbol: Symbol#to_s: a Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Hash: Hash#size: 2 Hash#default: Hash#default_proc: Pair 0: Key: Symbol: Symbol#to_s: b Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Fixnum 0 Pair 1: Key: Symbol: Symbol#to_s: c Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Fixnum 1 Pair 1: Key: Symbol: Symbol#to_s: d Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Hash: Hash#size: 2 Hash#default: Hash#default_proc: Pair 0: Key: Symbol: Symbol#to_s: e Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Fixnum 2 Pair 1: Key: Symbol: Symbol#to_s: f Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Fixnum 3 ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-2.0.0 | markdown/readme/classes/hash/nested/show.md |