class Hashery::OpenHash

OpenHash is a Hash, but also supports open properties much like OpenStruct.

Only names that are name methods of Hash can be used as open slots. To open a slot for a name that would otherwise be a method, the method needs to be made private. The ‘#open!` method can be used to handle this.

Examples

o = OpenHash.new
o.open!(:send)
o.send = 4