Created
August 9, 2016 13:47
-
-
Save brunojppb/317b0f382d10dae053f8e6b56a308599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Automovel | |
def self.tipo_cambio | |
puts "Manual" | |
end | |
def acelera | |
puts "Acelerando automóvel..." | |
end | |
end | |
class Carro < Automovel | |
def acelera | |
puts "Verificando equipamentos..." | |
super | |
end | |
end | |
Automovel.tipo_cambio | |
Carro.tipo_cambio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment