Skip to content

Instantly share code, notes, and snippets.

@dschneider
Created June 16, 2012 16:14
Show Gist options
  • Save dschneider/2941809 to your computer and use it in GitHub Desktop.
Save dschneider/2941809 to your computer and use it in GitHub Desktop.
Ruby - Conditions in Strings #2
string = "Hello " doctor ? string += "Dr. " : "" string += name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment