Last active
April 12, 2016 15:26
-
-
Save davejlong/b1d6b20d0d176c8efacb60f630aa8214 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
case | |
when options.key?("car") | |
# Validate car | |
when options.key?("driver") | |
# Validate driver | |
else | |
# If no other statement matches, error out | |
end |
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
if options.key?("car") || options.key?("driver") | |
validate_car(options["car"]) if options.key?("car") | |
validate_driver(options["driver"]) if options.key?("driver") | |
else | |
raise StandardError, "..." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment