Skip to content

Instantly share code, notes, and snippets.

@Inviz
Created April 3, 2009 11:15
Show Gist options
  • Select an option

  • Save Inviz/89711 to your computer and use it in GitHub Desktop.

Select an option

Save Inviz/89711 to your computer and use it in GitHub Desktop.
>>> var a = new Class({method: function() { console.log(1) }})
>>> var b = new Class({Extends: a, method: function() { console.log(2); this.parent(); }})
>>> var c = new Class({Extends: b})
>>> (new c).method(0)
2
1
>>> Class.refactor(c, {method: function() { this.previous(); console.log('c') }})
function()
>>> (new c).method(0)
2
2
1
c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment