Class: ALib::AutoHash

Inherits:
Hash show all
Defined in:
lib/alib-0.5.1/autohash.rb

Overview

auto vivifying hash that dumps as yaml nicely

Instance Method Summary collapse

Methods inherited from Hash

#getopt, #hasopt?

Constructor Details

#initialize(*args) ⇒ AutoHash

Returns a new instance of AutoHash.



5
6
7
# File 'lib/alib-0.5.1/autohash.rb', line 5

def initialize(*args)
  super(*args){|a,k| a[k] = AutoHash::new(*args)}
end

Instance Method Details

#classObject



8
9
10
# File 'lib/alib-0.5.1/autohash.rb', line 8

def class
  Hash
end