Description Usage Arguments Value Examples
Get the function in a handler, handler_list or dispatcher objects.
1 | get_fun(obj)
|
obj |
An object of type handler, handler_list or dispatcher. |
Returns a function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | set_birth_date <- function(obj, event){
obj$birthDate <- event$body$birthDate
return(obj)
}
set_death_date <- function(obj, event){
obj$deathDate <- event$body$deathDate
return(obj)
}
birth_handler <- handler(type = 'BIRTH', FUN = set_birth_date)
get_fun(birth_handler)
death_handler <- handler(type = 'DEATH', FUN = set_death_date)
get_fun(death_handler)
handlers <- handlers_list(birth_handler, death_handler)
get_fun(handlers)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.