/scripster/src/razie/scripting/ScriptFactoryScala.scala
http://razpub.googlecode.com/ · Scala · 18 lines · 10 code · 3 blank · 5 comment · 0 complexity · 2bd15da2caeaca4973591c77dfdff019 MD5 · raw file
- /**
- * Razvan's public code. Copyright 2008 based on Apache license (share alike) see LICENSE.txt for
- * details. No warranty implied nor any liability assumed for this code.
- */
- package razie.scripting
- import com.razie.pub.base._
- /** add capability to support scala scripts */
- class ScriptFactoryScala (val other:ScriptFactory, val dflt:Boolean) extends ScriptFactory {
- override def makeImpl (lang:String, s:String) = {
- (lang, dflt) match {
- case ("scala", _) | (null, true) => new ScriptScala(s)
- case _ => other.makeImpl (lang, s)
- }
- }
- }