2019-09-12 21:27:10 +02:00
|
|
|
module Preloader
|
|
|
|
def get_preload(preload)
|
|
|
|
return "" unless preload
|
2019-09-13 18:07:51 +02:00
|
|
|
preload = Vool::Builtin.builtin.keys.join(";") if(preload == "all" )
|
2019-09-12 21:27:10 +02:00
|
|
|
preload.split(";").collect do |loads|
|
2019-09-13 18:07:51 +02:00
|
|
|
raise "no preload #{loads}" unless Vool::Builtin.builtin[loads]
|
2019-09-12 21:27:10 +02:00
|
|
|
clazz , meth = loads.split(".")
|
2019-09-13 18:07:51 +02:00
|
|
|
"class #{clazz}; #{Vool::Builtin.builtin[loads]};end;"
|
2019-09-12 21:27:10 +02:00
|
|
|
end.join
|
|
|
|
end
|
|
|
|
def preload
|
|
|
|
get_preload(@preload)
|
|
|
|
end
|
|
|
|
end
|