Created
August 9, 2016 13:01
-
-
Save brunojppb/fc9b34cc28c8b7f021f0d0da311c9a06 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 acelera | |
# Aciona injeção eletrônica | |
# injeta combustível e etc... | |
puts "Acelerando automóvel..." | |
end | |
end | |
class Carro < Automovel | |
def acelera | |
# Verfica freios e outras coisas | |
# Que o carro especificamente necessita | |
puts "Verificando equipamentos..." | |
super | |
end | |
end | |
carro = Carro.new | |
carr.acelera | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment