Last active
December 15, 2015 04:28
-
-
Save danieljohnmorris/5201422 to your computer and use it in GitHub Desktop.
In Ruby you can be an artist and a cowboy, after all!
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 Person | |
attr_accessor :pocket | |
end | |
class Artist < Person | |
def draw_like_an_artist | |
"Look, I painted a landscape." | |
end | |
end | |
module CowboyTraits < Person | |
def draw_like_a_cowboy | |
"*Pow pow* ...I shot you in the face." | |
end | |
end | |
class ArtistCowboy < Artist | |
include CowboyTraits | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment