Skip to content

Instantly share code, notes, and snippets.

@Clokze
Created February 4, 2014 13:04
Show Gist options
  • Select an option

  • Save Clokze/8803231 to your computer and use it in GitHub Desktop.

Select an option

Save Clokze/8803231 to your computer and use it in GitHub Desktop.
getter/setter
class Person
get = (props) => @::__defineGetter__ name, getter for name, getter of props
set = (props) => @::__defineSetter__ name, setter for name, setter of props
# @property [String] The person name
get name: -> @_name
set name: (@_name) ->
# The persons age
get age: -> @_age
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment