Cache: symbol to method
This commit is contained in:
parent
d1d48ea4f9
commit
fdd16d05e1
|
@ -37,12 +37,12 @@ class LogAn::Cache
|
||||||
|
|
||||||
def read_cache= type
|
def read_cache= type
|
||||||
@type &= ~ (type ? 0 : 1)
|
@type &= ~ (type ? 0 : 1)
|
||||||
define_singleton_method :[], type ? :oget : :dget
|
define_singleton_method :[], method( type ? :oget : :dget)
|
||||||
end
|
end
|
||||||
|
|
||||||
def write_cache= type
|
def write_cache= type
|
||||||
@type &= ~ (type ? 0 : 2)
|
@type &= ~ (type ? 0 : 2)
|
||||||
define_singleton_method :[], type ? :oset : :dset
|
define_singleton_method :[], method( type ? :oset : :dset)
|
||||||
end
|
end
|
||||||
|
|
||||||
#include Enumerable
|
#include Enumerable
|
||||||
|
|
Loading…
Reference in a new issue