diff options
author | Marc-Andre Lafortune <[email protected]> | 2020-09-08 17:13:03 -0400 |
---|---|---|
committer | Marc-Andre Lafortune <[email protected]> | 2020-09-14 12:46:49 -0400 |
commit | 12a13eef49dd2d839f502a7d848b7d600e8b645a (patch) | |
tree | dacebdac751a1e136224aa98f1ec552471269c31 /lib/ostruct.rb | |
parent | 8eefa8f3736cd5dbf7256f571b368198102f11cc (diff) |
[ruby/ostruct] Tweak doc
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r-- | lib/ostruct.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb index 5f3d301ce0..c6f3be04e3 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -36,9 +36,10 @@ # Hash keys with spaces or characters that could normally not be used for # method calls (e.g. <code>()[]*</code>) will not be immediately available # on the OpenStruct object as a method for retrieval or assignment, but can -# still be reached through the Object#send method. +# still be reached through the Object#send method or using []. # # measurements = OpenStruct.new("length (in inches)" => 24) +# measurements[:"length (in inches)"] # => 24 # measurements.send("length (in inches)") # => 24 # # message = OpenStruct.new(:queued? => true) |