Skip to content

Instantly share code, notes, and snippets.

@danielrose7
Created August 30, 2016 06:30
Show Gist options
  • Save danielrose7/d0bbc6a0787ddd78ac24e51597facf2f to your computer and use it in GitHub Desktop.
Save danielrose7/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