In: |
HashStruct.rb
basiclibrary.rb |
Parent: | OpenStruct |
A mix of Hash and OpenStruct behavior.
foo = HashStruct.new foo.bar = "Hello" foo['jimmy'] = "World" x = :jammy foo[x] = "How goes it?" p foo #=> <HashStruct bar="Hello" jammy="How goes it?" jimmy="World">