This class is used to create a storage for tidymodules objects.
Manage applications, sessions and modules.
new()
Create a new ModStore object. Should be called once by the TidyModule class. Not to be called directly outside TidyModule. The ModStore object can be retrieved from any TidyModule object, see example below.
ModStore$new()
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
isStored()
Check if a module is stored in the current session.
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
s$isStored(m)
getGlobalSession()
Retrieve the global session 'global_session'. This is the session that exists outside the application server function
addEdge()
Add modules connections into ModStore. An edge is either a connection between a reactive object and a module or between two modules.
## ------------------------------------------------
## Method `ModStore$new`
## ------------------------------------------------
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
## ------------------------------------------------
## Method `ModStore$isStored`
## ------------------------------------------------
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
s$isStored(m)
#> [1] TRUE