Skip to content

Instantly share code, notes, and snippets.

@runkmc
Last active December 23, 2015 03:49
Show Gist options
  • Save runkmc/6576526 to your computer and use it in GitHub Desktop.
Save runkmc/6576526 to your computer and use it in GitHub Desktop.
def squish!
gsub!(/\A[[:space:]]+/, '')
gsub!(/[[:space:]]+\z/, '')
gsub!(/[[:space:]]+/, ' ')
self
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment