예제 #1
0
 JRubyVerticle(String scriptName, ClassLoader cl) {
   this.container = new ScriptingContainer(LocalContextScope.SINGLETHREAD);
   container.setClassLoader(cl);
   // Prevent JRuby from logging errors to stderr - we want to log ourselves
   container.setErrorWriter(new NullWriter());
   this.cl = cl;
   this.scriptName = scriptName;
 }
예제 #2
0
파일: Engine.java 프로젝트: jgoz/play-sass
 Engine(File root) {
   List<String> loadPaths = new ArrayList<String>();
   loadPaths.add(new File(root, "lib").getAbsolutePath());
   for (VirtualFile vf : Play.roots) {
     loadPaths.add(new File(vf.getRealFile(), "public/stylesheets").getAbsolutePath());
   }
   scriptingContainer = new ScriptingContainer();
   scriptingContainer.getProvider().setLoadPaths(loadPaths);
   scriptingContainer.setErrorWriter(errors);
 }