Skip to content
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
@catmando

Description

@catmando

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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions