Skip to content

Instantly share code, notes, and snippets.

@tjwallace
Created August 22, 2011 04:42
Show Gist options
  • Save tjwallace/1161678 to your computer and use it in GitHub Desktop.
Save tjwallace/1161678 to your computer and use it in GitHub Desktop.
middle_name = case full_name
when /^.*\s(.*)\s.*$/
$1
else
"Peatrice"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment