5 # - Same interface as DBM class
17 def fetch( keystr, ifnone = nil )
20 return YAML::load( val ) if String === val
30 super( keystr.to_yaml )
32 def values_at( *keys )
33 keys.collect { |k| fetch( k ) }
44 del_keys.delete_if { |k| yield( k, fetch( k ) ) == false }
45 del_keys.each { |k| delete( k ) }
50 hsh.reject { |k,v| yield k, v }
53 keys.each { |k| yield k, fetch( k ) }
57 super { |v| yield YAML::load( v ) }
61 super.collect { |v| YAML::load( v ) }
64 each_value { |v| return true if v == val }
69 keys.each { |k| h[ self.fetch( k ) ] = k }
78 a[1] = YAML::load( a[1] ) if a
83 self.keys.collect { |k| v = self[k]; [k, v] if yield k, v }.compact
89 super( key, val.to_yaml )
94 self.store( k, hsh.fetch( k ) )
100 keys.each { |k| a.push [ k, self.fetch( k ) ] }
105 keys.each { |k| h[ k ] = self.fetch( k ) }
108 alias :each :each_pair