Skip to content

Instantly share code, notes, and snippets.

@gvidon
Created November 30, 2014 15:32
Show Gist options
  • Save gvidon/31853b0a865404315477 to your computer and use it in GitHub Desktop.
Save gvidon/31853b0a865404315477 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
</head>
<body>
<script type="text/javascript" src="bower_components/underscore/underscore-min.js"></script>
<script type="text/javascript" src="bower_components/ring/ring.js"></script>
<script type="text/javascript">
var
A = ring.create({
testMe: function() { console.log('A'); _.result(this, '$super') }
}),
B = ring.create([A], {
testMe: function() { console.log('B'); this.$super() }
}),
C = ring.create([A], {
testMe: function() { console.log('C'); this.$super() }
}),
D = ring.create([B, C], {
testMe: function() { console.log('D'); this.$super() }
});
(new D).testMe();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment