blob: 24d828a15960642e05af70dc7b17b2115c99c39b (
plain) (
tree)
|
|
import language.dynamics
class DynamicTest extends Dynamic {
def selectDynamic(name: String) = s"value of $name"
def updateDynamic(name: String)(value: Any) {
println(s"You have just updated property '$name' with value: $value")
}
}
object MyApp extends App {
def testing() {
val test = new DynamicTest
test.firstName = "John"
}
testing()
}
|