Skip to content

Instantly share code, notes, and snippets.

@danieljohnmorris
Last active December 15, 2015 04:28
Show Gist options
  • Save danieljohnmorris/5201422 to your computer and use it in GitHub Desktop.
Save danieljohnmorris/5201422 to your computer and use it in GitHub Desktop.
In Ruby you can be an artist and a cowboy, after all!
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