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