Skip to content

Instantly share code, notes, and snippets.

@neara
Forked from BlairLeduc/zed.info.coffee
Created May 7, 2014 09:33
Show Gist options
  • Save neara/12181820f9f8d8b83b64 to your computer and use it in GitHub Desktop.
Save neara/12181820f9f8d8b83b64 to your computer and use it in GitHub Desktop.
@zed = @zed ? {}
@zed.info = do ->
#private
name = ""
getName = -> name
setName = (value) -> name = value
age = 0
getAge = -> age
setAge = (value) -> age = value
eat = (food) ->
if food?
alert "Yummy #{food}!"
else
alert "I'm still hungry!"
# public
getName: getName
setName: setName
getAge: getAge
setAge: setAge
eat: eat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment