Skip to content

Instantly share code, notes, and snippets.

@cpuguy83
Last active December 16, 2015 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpuguy83/5452056 to your computer and use it in GitHub Desktop.
Save cpuguy83/5452056 to your computer and use it in GitHub Desktop.
Case for class inheritance... AND THE SKARKTAPOUS!
class Amphibian
include Fishy
def walk
# on the ground
end
end
class Fish
include Fishy
def breathe
# with gills
end
end
module Fangy
def teeth
# pointy
end
end
module Fishy
def swim
# Just keep swimming!
end
end
class Shark < Fish
incude Fangy
def hungry
# nomnomnom
end
end
class Sharktapous < Shark
include Tentacally
# All Hail the sharktapous!
end
module Tentacally
# ???
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment