Created
August 30, 2016 06:30
-
-
Save danielpowell4/d0bbc6a0787ddd78ac24e51597facf2f to your computer and use it in GitHub Desktop.
Removes WUB's from popular songs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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