Sha256: eafd2dc8c1019a0d91b1988a6c584256b52f895818b924346381c43da63eed8a
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
#### Mixed OpenStruct This example shows an open struct of mixed values. ```show.rb```: ```ruby require 'ostruct' require 'debug_helper' ostruct = OpenStruct.new(:a => 0, :b => 'one', :c => :two) DebugHelper.show(ostruct, 'My mixed open struct') ``` The output shows details of the open struct. ```show.yaml```: ```yaml --- OpenStruct (message='My mixed open struct'): 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: String: String#to_s: one String#size: 3 String#encoding: !ruby/encoding UTF-8 String#ascii_only?: true String#bytesize: 3 Member 2: Name: Symbol: Symbol#to_s: c Symbol#size: 1 Symbol#encoding: !ruby/encoding US-ASCII Value: Symbol: Symbol#to_s: two Symbol#size: 3 Symbol#encoding: !ruby/encoding US-ASCII ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-2.0.0 | markdown/readme/classes/open_struct/mixed/show.md |