This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
add [] and []= operators to state and mutate #4
Open
Description
so you can do things like
state[my_var]
and
mutate[my_var] = 12
etc...
This is a working monkey patch:
class HyperStore::StateWrapper < HyperStore::BaseStoreClass
def [](x)
__send__(x)
end
end
class HyperStore::MutatorWrapper < HyperStore::BaseStoreClass
def [](x)
__send__(x)
end
def []=(x, y)
__send__(x, y)
end
end
Need to add a test spec is all...