Check the code linked in this post: Testing that a module implements a given behaviour
Alternatively, if you keep all of the modifier modules behind a common prefix, like MyApp.Modifier
, then you can just provide the particular modifier ‘submodule’ name rather than the fully qualified module name. In other words, the json has type: Health
and you do "MyApp.Modifier" <> params[type]
. That way you provide a scope for which modules can be executed.