Sha256: 303cd99a0e44a349d007afc5b9bca048f7a9d97e6b75b7b85dcb584ddb00720c
Contents?: true
Size: 851 Bytes
Versions: 1
Compression:
Stored size: 851 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: 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/open_struct/simple/show.md |