Sha256: e9171327ce88becf71a5af9056a9164649eb1686bcc61a88cd0737ed574715c9
Contents?: true
Size: 1.63 KB
Versions: 2
Compression:
Stored size: 1.63 KB
Contents
### Option ```depth``` This example shows how option ```depth``` affects output. ```show.rb```: ```ruby require 'debug_helper' ary = [0, [1, [2, [3, [4] ] ] ] ] (1..5).each do |depth| message = "Show depth #{depth}" DebugHelper.show(ary, message, {:depth => depth}) end ``` The output shows output for various depths. ```show.yaml```: ```yaml --- Array (message='Show depth 1' size=2): Element 0: Fixnum 0 Element 1: Array [1, [2, [3, [4]]]] --- Array (message='Show depth 2' size=2): Element 0: Fixnum 0 Element 1: Array (size=2): Element 0: Fixnum 1 Element 1: Array [2, [3, [4]]] --- Array (message='Show depth 3' size=2): Element 0: Fixnum 0 Element 1: Array (size=2): Element 0: Fixnum 1 Element 1: Array (size=2): Element 0: Fixnum 2 Element 1: Array [3, [4]] --- Array (message='Show depth 4' size=2): Element 0: Fixnum 0 Element 1: Array (size=2): Element 0: Fixnum 1 Element 1: Array (size=2): Element 0: Fixnum 2 Element 1: Array (size=2): Element 0: Fixnum 3 Element 1: Array [4] --- Array (message='Show depth 5' size=2): Element 0: Fixnum 0 Element 1: Array (size=2): Element 0: Fixnum 1 Element 1: Array (size=2): Element 0: Fixnum 2 Element 1: Array (size=2): Element 0: Fixnum 3 Element 1: Array (size=1): Element 0: Fixnum 4 ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-1.7.0 | markdown/readme/options/depth/show.md |
debug_helper-1.6.0 | markdown/readme/options/depth/show.md |