Following example shows how super function is interpreted by ruby.
[gist]http://gist.github.com/704912[/gist]
Output:
6
16
—
In this example we can see that super calls up the function of the base-class in which it is called.
Following example shows how super function is interpreted by ruby.
[gist]http://gist.github.com/704912[/gist]
Output:
6
16
—
In this example we can see that super calls up the function of the base-class in which it is called.
Comments