Created
December 28, 2012 23:19
-
-
Save kmandreza/4403003 to your computer and use it in GitHub Desktop.
Create a method called welcome that accepts an address as a single string. It returns "Welcome to California" if the address includes "CA" and "You should move to California" otherwise.
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
def welcome(address) | |
if address.match("CA") | |
return "Welcome to California" | |
else | |
return "You should move to California" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment