Created
          November 28, 2011 10:49 
        
      - 
      
 - 
        
Save tdegrunt/1399955 to your computer and use it in GitHub Desktop.  
    Batman.Model custom accessor sample
  
        
  
    
      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
    
  
  
    
  | class User extends Batman.Model | |
| @accessor 'age', set: (k, v) -> | |
| @set('age', +v) #=> Will cause infinite loop | |
| @[k] = v #=> Use this instead | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment