Sha256: cf607cace0ade71d839465091caf8bb07757c7c6f0575812822d421966bc81f2
Contents?: true
Size: 849 Bytes
Versions: 1
Compression:
Stored size: 849 Bytes
Contents
#### Simple Struct This example shows a simple struct. ```show.rb```: ```ruby require 'debug_helper' MyStruct = Struct.new(:a, :b, :c) struct = MyStruct.new(0, 1, 2) DebugHelper.show(struct, 'My simple struct') ``` The output shows details of the struct. ```show.yaml```: ```yaml --- MyStruct (message='My simple struct'): MyStruct#size: 3 Member 0: Name: Symbol: Symbol#to_s: a Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Integer 0 Member 1: Name: Symbol: Symbol#to_s: b Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Integer 1 Member 2: Name: Symbol: Symbol#to_s: c Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Integer 2 ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-2.1.0 | markdown/readme/classes/struct/simple/show.md |