ordered_auto_hash.rb

Path: lib/ordered_auto_hash.rb
Last Update: Thu May 25 20:16:22 CEST 2006

OrderedAutoHash

Version

 1.2006.05.23 (change of the first number means Big Change)

Description

 Hash which auto initializes it's children.

Usage

 (see examples directory under the ruby gems root directory)

 require 'rubygems'
 require 'ordered_auto_hash'

 oah = OrderedAutoHash.new
 oah['section one']['param one'] = 4
 oah['section one']['param two'] = 5
 oah['section one']['param three'] = 2
 oah['section one']['param four'] = 3

 p oah
 {"section one"=>{"param one"=>4, "param two"=>5, "param three"=>2, "param four"=>3}}

 p oah['section one'].keys
 ["param one", "param two", "param three", "param four"]

Source

 http://simplypowerful.1984.cz/goodlibs/1.2006.05.23

Author

 Ara.T.Howard (/Ara/dot/T/dot/Howard/at/noaa/dot/gov)

Licence

 You can redistribute it and/or modify it under the same terms of Ruby's license;
 either the dual license version in 2003, or any later version.

Required files

ordered_hash  

[Validate]