In Ruby (the language), super is a keyword that calls a parent class’s method. It has nothing to do with the Pokémon item "Super Rod."
class Vehicle
def initialize(brand)
@brand = brand
end
def start
puts "Starting #{@brand} vehicle..."
end
end
class Car < Vehicle
def start
super # calls Vehicle#start
puts "Engine started. Ready to drive!"
end
end
Car.new("Toyota").start
# Output:
# Starting Toyota vehicle...
# Engine started. Ready to drive!
super invokes the same-named method in the superclass.super() calls with no arguments; super(args) passes arguments explicitly.super, the child method completely overrides the parent’s.This is standard single-inheritance behavior in Ruby.