Last active
December 16, 2015 14:58
-
-
Save cpuguy83/5452056 to your computer and use it in GitHub Desktop.
Case for class inheritance... AND THE SKARKTAPOUS!
This file contains 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 Amphibian | |
include Fishy | |
def walk | |
# on the ground | |
end | |
end |
This file contains 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 Fish | |
include Fishy | |
def breathe | |
# with gills | |
end | |
end |
This file contains 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
module Fangy | |
def teeth | |
# pointy | |
end | |
end |
This file contains 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
module Fishy | |
def swim | |
# Just keep swimming! | |
end | |
end |
This file contains 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 Shark < Fish | |
incude Fangy | |
def hungry | |
# nomnomnom | |
end | |
end |
This file contains 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 Sharktapous < Shark | |
include Tentacally | |
# All Hail the sharktapous! | |
end |
This file contains 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
module Tentacally | |
# ??? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment