Sha256: 6a2330d56cb582a091fff2cefaec4b18928f447e39452bdbfa4a6f8bdce1dc0b
Contents?: true
Size: 846 Bytes
Versions: 1
Compression:
Stored size: 846 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: Fixnum 0 Member 1: Name: Symbol: Symbol#to_s: b Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Fixnum 1 Member 2: Name: Symbol: Symbol#to_s: c Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Fixnum 2 ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-2.0.0 | markdown/readme/classes/struct/simple/show.md |