diff options
author | eaceaser <eac@twitter.com> | 2010-11-15 15:53:50 -0800 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-07 02:08:37 -0500 |
commit | 54fe2f15640ba71f01f3bd6637270ce4b7ac3420 (patch) | |
tree | 7e8281b66d8b676ebb5d4cfba86650e0f0b31f38 /libraries/eval/Eval.scala | |
parent | da67abe4f2d52845569ea0f2a8a769dce610ad92 (diff) | |
download | cbt-54fe2f15640ba71f01f3bd6637270ce4b7ac3420.tar.gz cbt-54fe2f15640ba71f01f3bd6637270ce4b7ac3420.tar.bz2 cbt-54fe2f15640ba71f01f3bd6637270ce4b7ac3420.zip |
Add support for multiple file compilation.
Diffstat (limited to 'libraries/eval/Eval.scala')
-rw-r--r-- | libraries/eval/Eval.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/eval/Eval.scala b/libraries/eval/Eval.scala index fc4c2ba..93e09f9 100644 --- a/libraries/eval/Eval.scala +++ b/libraries/eval/Eval.scala @@ -95,8 +95,8 @@ object Eval { /** * Eval[Int](new File("...")) */ - def apply[T](fileToEval: File): T = { - val stringToEval = scala.io.Source.fromFile(fileToEval).mkString + def apply[T](fileToEval: File*): T = { + val stringToEval = List(fileToEval: _*).map(scala.io.Source.fromFile(_).mkString).mkString apply(stringToEval) } |