Skip to content

Instantly share code, notes, and snippets.

@rfreedman
Created September 13, 2011 18:07
Show Gist options
  • Select an option

  • Save rfreedman/1214540 to your computer and use it in GitHub Desktop.

Select an option

Save rfreedman/1214540 to your computer and use it in GitHub Desktop.

Revisions

  1. rfreedman revised this gist Sep 13, 2011. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.coffee
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    class Mammal
    constructor: (@species, @defining_char) ->
    print: ->
    "Hello I'm a " + species + ". " +
    "I have " + defining_char + "."
    "Hello I'm a " + @species + ". " +
    "I have " + @defining_char + "."

    cat = new Mammal('cat', 'claws')
    cat.print()
    alert(cat.print())
  2. @lookfirst lookfirst created this gist Sep 13, 2011.
    8 changes: 8 additions & 0 deletions gistfile1.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    class Mammal
    constructor: (@species, @defining_char) ->
    print: ->
    "Hello I'm a " + species + ". " +
    "I have " + defining_char + "."

    cat = new Mammal('cat', 'claws')
    cat.print()