Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

explain `super`

  • Loading branch information...
commit 3acc50e1234f8f7c6e7c8f117a2c9c9ddc6d9374 1 parent c1ae6af
Mislav Marohnić authored
Showing with 7 additions and 0 deletions.
  1. +3 −0  explanations/super.md
  2. +4 −0 processor.rb
3  explanations/super.md
View
@@ -0,0 +1,3 @@
+## Call the overridden method implementation
+
+The `super` keyword is a way of calling the method implementation that was overridden by the current implementation. It is typically used in a subclass to invoke the same-named method defined in the superclass.
4 processor.rb
View
@@ -110,6 +110,10 @@ def process_cvdecl(exp)
mark(:variable_class) + super
end
+ def process_super(exp)
+ mark(:super) + super
+ end
+
CALLS = [:require, :attr_accessor, :attr_reader, :attr_writer, :include, :extend]
def process_call(exp)
Please sign in to comment.
Something went wrong with that request. Please try again.