Created
          June 24, 2015 19:55 
        
      - 
      
- 
        Save gustavoamigo/9a0b2382fac99e45d69a to your computer and use it in GitHub Desktop. 
    Shakespeare with Dynamic Trait
  
        
  
    
      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
    
  
  
    
  | // Fun with scala.Dynamic http://www.scala-lang.org/api/current/index.html#scala.Dynamic | |
| case object MacBeth extends Dynamic { | |
| def applyDynamic(method: String)(args: Any *) = { | |
| println(s"$method") | |
| MacBeth | |
| } | |
| } | |
| MacBeth itIsATale() toldByAnIdiot() fullOfSoundAndFury() signifyingNothing() | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment