Skip to content

Instantly share code, notes, and snippets.

@corygibbons
Created March 23, 2017 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save corygibbons/ca4ffe672589f700cea899395086a711 to your computer and use it in GitHub Desktop.
Save corygibbons/ca4ffe672589f700cea899395086a711 to your computer and use it in GitHub Desktop.
Framer getters and setters
class Foo extends Layer
@define "bar",
get: ->
return @_bar + " was his name"
set: (value) ->
@_bar = value
foo = new Foo
foo.bar = "Michael"
print foo.bar # "Michael was his name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment