super_method
If a class has the same method defined somewhere in the inheritance chain, we can use super_method to access it.
module Foo
def foo
'foo'
end
end
class Bar
include Foo
def foo
'bar'
end
end
Bar.new.method(:foo).call
# => "bar"
Bar.new.method(:foo).super_method.call
# => "foo"
Tweet