Skip to content

Instantly share code, notes, and snippets.

@francescoagati
Created July 3, 2011 21:31
Show Gist options
  • Save francescoagati/1062627 to your computer and use it in GitHub Desktop.
Save francescoagati/1062627 to your computer and use it in GitHub Desktop.
an example of private method in coffeescript with body class writable style ruby
class Animal
private_method= -> 1+1
@::sum= -> private_method()
dog=new Animal()
alert dog.sum()
class Fish extends Animal
delfin=new Fish()
alert delfin.sum()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment