Skip to content

Instantly share code, notes, and snippets.

@danielpowell4
Created August 30, 2016 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpowell4/d0bbc6a0787ddd78ac24e51597facf2f to your computer and use it in GitHub Desktop.
Save danielpowell4/d0bbc6a0787ddd78ac24e51597facf2f to your computer and use it in GitHub Desktop.
Removes WUB's from popular songs
def song_decoder(lyrics)
lyrics.upcase.gsub('WUB', ' ').squeeze(' ').strip.capitalize
end
song_decoder("WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB")
# => WE ARE THE CHAMPIONS MY FRIEND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment