1Builder <- setRefClass( 2 'Builder', 3 contains = 'App', 4 methods = list( 5 initialize = function(...){ 6 objs <- list(...) 7 if (length(objs) > 1){ 8 for (i in 1:(length(objs)-1)){ 9 if (inherits(objs[[i]],'Middleware')) 10 objs[[i]]$set_app(objs[[i+1]]) 11 else 12 stop("Argument ",i,"is not a Middleware object") 13 } 14 } 15 callSuper(app=objs[[1]]) 16 } 17 ) 18) 19