Open TylerGrantSmith opened 4 years ago
strange that printing the stateful_function
doesn't reprex correctly.
Nevermind, it is because I didn't rebuild the documentation to catch the s3method
Originally I was thinking the user could just supply the .env
but that has the unintended consequence of sharing the environment with all functions. maybe instead it should just provide a named list and the environment is built in the factory
Ok, I think it is ugly, but now build_factory
takes a named list argument .state
which, if provided will be used to make the manufactured functions environment a child environment of the calling environment with bindings taken from .state
. I also modified body_insert
to not produce warnings when length(before)>1
Please remove the test on line 16 of test-build_factory.R
Also, please run styler::style_pkg()
and goodpractice::gp(), and follow the advice in those.
Closes #34.
The travis test is failing because of a warning that before
is not documented on the roxygen
code of body_insert
. Why is this an exported function, btw?
Not quite there yet...
Created on 2020-06-03 by the reprex package (v0.3.0)