When you use self inside the module as follows:
def self.for(browser, *args) end
declared as a module function , not a method of an instance of the class that this module will include. This means that it will not appear in the included classes when the module is moved to another class.
This is similar to the entry:
def SeleniumWebDriverExtension::for end
So, if you want to call super from a module, declare it as a simple instance method , as the accepted answer suggested. Just wanted to clear you of the reasoning behind this.
Btw SeleniumWebDriverExtension.ancestors to be clear in the inheritance hierarchy.
source share