Created
August 31, 2011 16:30
-
-
Save eqdw/1183964 to your computer and use it in GitHub Desktop.
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 Chocolate | |
def white?; ...; end; | |
def caffeinated?; ...; end; | |
def imported?; ...; end; | |
end | |
#main script | |
@chocolate = Chocolate.new | |
### THIS PART ### | |
case @chocolate | |
when .white? | |
... | |
when .caffeinated? | |
... | |
when .imported? | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment