redex
redex copied to clipboard
Document global g_redex
There's no documentation that to use libredex you need to instantiate a RedexContext and set the global g_redex to it. This should at least be documented, or refactored around.
At least now I can find out if I can do the thing I'm trying to do! :-)
Any suggestions for refactoring? It is really, really convenient to have g_redex be a global, or else it would have to be passed around everywhere. It's also nice to have it be an easily resettable object; we used to just have a bunch of static maps, and that made it really hard to write tests that needed "clean" contexts.
I haven't used the write side of the library yet, so I can't really comment on a refactoring. Documentation of the global, though—perhaps a readme in /libredex?