Created
January 12, 2012 21:58
-
-
Save kyrylo/1603403 to your computer and use it in GitHub Desktop.
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 Suit | |
def red?; not black?; end | |
end | |
class Heart < Suit | |
def black?; false; end | |
end | |
class Diamond < Suit | |
def black?; false; end | |
end | |
class Spade < Suit | |
def black?; true; end | |
end | |
class Club < Suit | |
def black?; true; end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment