HashStruct (Class)

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">

Methods

[]   []   []=   []=  

Public Instance methods

Access a value in the HashStruct by key.

key may be a String, Fixnum or Symbol.

Access a value in the HashStruct by key

Set a key/value pair the HashStruct.

key may be a String, Fixnum or Symbol.

[Validate]