Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use R6? #18

Open
donyunardi opened this issue Apr 21, 2023 · 1 comment
Open

use R6? #18

donyunardi opened this issue Apr 21, 2023 · 1 comment
Assignees

Comments

@donyunardi
Copy link
Owner

Instead of using the options() to store multiloadr, should we create R6 class instead?

x <- multiloadr$new()

# methods
x$add_pkgs()
x$list_pkgs()
x$load_pkgs()

# constructor
multiloadr_obj <- create_multiloadr(path, pkg_name, branch_name, from_commit) # return multiloadr object
add_pkgs(multiloadr_obj, path, pkg_name, branch_name, from_commit)
list_pkgs(multiloadr_obj)
load_pkgs(multiloadr_obj)
@vedhav
Copy link
Contributor

vedhav commented Dec 1, 2023

Totally. I do not like the fact that we're storing the data about the package and paths as options. R6 will make it well isolated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants