-
-
Save videlais/d1aea07d4cd0d7a77dd1 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 Parser | |
def initalize() | |
end | |
def parse(input) | |
case input | |
when "Dan" | |
good_response | |
else | |
bad_response | |
end | |
end | |
def good_response | |
puts "Looks like your name is Dan. Neat!" | |
end | |
def bad_response | |
puts "You are not a Dan!" | |
end | |
end | |
parser = Parser.new | |
parser.parse("Dan") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment