Created
December 22, 2015 18:14
-
-
Save arnaldog/54bcea4078e76d407c70 to your computer and use it in GitHub Desktop.
To Flaite Method
This file contains hidden or 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
class String | |
def to_flaite | |
self.split('').map { |s| (rand(10) %3 == 0) ? s.upcase : s }.join | |
end | |
end | |
"Que pasa compare como estamos".to_flaite | |
=> "QuE PASa compARe CoMo EStAmOs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment