Cache#each added.
This commit is contained in:
parent
3e9022a677
commit
8b77d3811b
1 changed files with 8 additions and 7 deletions
|
@ -45,13 +45,14 @@ class LogAn::Cache
|
|||
define_singleton_method :[]=, method( type ? :oset : :dset)
|
||||
end
|
||||
|
||||
#include Enumerable
|
||||
#def each &e
|
||||
#return Enumerator.new self, :each unless e
|
||||
#flush!
|
||||
#@source.each &e
|
||||
#self
|
||||
#end
|
||||
include Enumerable
|
||||
def each
|
||||
return Enumerator.new self, :each unless e
|
||||
(@source.keys + @data.keys).each do |key|
|
||||
yield key, self[key]
|
||||
end
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
class LogAn::AutoValueConvertHash
|
||||
|
|
Loading…
Reference in a new issue