Created
October 13, 2012 14:00
-
-
Save ahoy-jon/3884710 to your computer and use it in GitHub Desktop.
This file contains 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
import language.dynamics | |
case class DynamicDuke(prefix:String = "") extends Dynamic { | |
def apply(s:String) = DynamicDuke(prefix + s) | |
def selectDynamic(method:String) = DynamicDuke(prefix + " " + method) | |
def applyDynamic(method:String) = selectDynamic(method) | |
} | |
val duke = DynamicDuke() | |
// ... | |
//Et certains diront que les possibilités sont infinies ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment