Cache: symbol to method

master
Denis Knauf 2010-03-29 19:22:43 +02:00
parent d1d48ea4f9
commit fdd16d05e1
1 changed files with 2 additions and 2 deletions

View File

@ -37,12 +37,12 @@ class LogAn::Cache
def read_cache= type
@type &= ~ (type ? 0 : 1)
define_singleton_method :[], type ? :oget : :dget
define_singleton_method :[], method( type ? :oget : :dget)
end
def write_cache= type
@type &= ~ (type ? 0 : 2)
define_singleton_method :[], type ? :oset : :dset
define_singleton_method :[], method( type ? :oset : :dset)
end
#include Enumerable