Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

explain `super`

  • Loading branch information...
commit 3acc50e1234f8f7c6e7c8f117a2c9c9ddc6d9374 1 parent c1ae6af
Mislav Marohnić authored

Showing 2 changed files with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +3 0  explanations/super.md
  2. +4 0 processor.rb
3  explanations/super.md
Source Rendered
... ... @@ -0,0 +1,3 @@
  1 +## Call the overridden method implementation
  2 +
  3 +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
@@ -110,6 +110,10 @@ def process_cvdecl(exp)
110 110 mark(:variable_class) + super
111 111 end
112 112
  113 + def process_super(exp)
  114 + mark(:super) + super
  115 + end
  116 +
113 117 CALLS = [:require, :attr_accessor, :attr_reader, :attr_writer, :include, :extend]
114 118
115 119 def process_call(exp)

0 comments on commit 3acc50e

Please sign in to comment.
Something went wrong with that request. Please try again.