Skip to content

Instantly share code, notes, and snippets.

@zeekay
Forked from rfreedman/gist:1214540
Created September 13, 2011 18:43
Show Gist options
  • Select an option

  • Save zeekay/1214650 to your computer and use it in GitHub Desktop.

Select an option

Save zeekay/1214650 to your computer and use it in GitHub Desktop.
modified Mammal CoffeeScript example
class Mammal
constructor: (@species, @defining_char) ->
print: ->
"Hello I'm a #{@species}. I have #{@defining_char}."
cat = new Mammal 'cat', 'claws'
alert cat.print()
@zeekay
Copy link
Copy Markdown
Author

zeekay commented Sep 13, 2011

String interpolation huzzah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment