Sha256: 00b1010114da1a3c6d09ba2c79f88a7cd589595482287ba5bd3bd0bd3c62c2a3
Contents?: true
Size: 1.68 KB
Versions: 1
Compression:
Stored size: 1.68 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: Integer 0 Pair 1: Key: Symbol: Symbol#to_s: c Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Integer 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: Integer 2 Pair 1: Key: Symbol: Symbol#to_s: f Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Integer 3 ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-2.1.0 | markdown/readme/classes/hash/nested/show.md |