Skip to content

Instantly share code, notes, and snippets.

@ryoppy
Created September 16, 2013 21:28
Show Gist options
  • Save ryoppy/6586825 to your computer and use it in GitHub Desktop.
Save ryoppy/6586825 to your computer and use it in GitHub Desktop.
valを気軽にオーバーライド
case class A {
val now = System.currentTimeMillis
}
// for UnitTest
val a1 = new A { override val now = new DateTime("2013-01-01") }
println(a1.now)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment