This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.log4.methodmissing | |
import java.io.File | |
class Path(name: String = "", parent: Option[Path] = None) extends Dynamic { | |
def applyDynamic(methodName: String)(args: Any*) = new Path(methodName, Option(this)) | |
override def toString = (if(parent.isDefined) parent.get.toString + File.separatorChar else "") + name | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Results of a 1 hour 'bucketline' exercise @ Marktplaats to test-drive the development | |
* of a Yahtzee scorer in Scala. | |
*/ | |
// --- the test --- // | |
import org.scalatest.FlatSpec | |
import org.scalatest.matchers.ShouldMatchers | |
import Scorer._ |
OlderNewer