Skip to content

Instantly share code, notes, and snippets.

@videlais
Created April 14, 2015 02:15
Show Gist options
  • Save videlais/d1aea07d4cd0d7a77dd1 to your computer and use it in GitHub Desktop.
Save videlais/d1aea07d4cd0d7a77dd1 to your computer and use it in GitHub Desktop.
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