Created
November 16, 2015 20:16
-
-
Save kkchu791/435fd5358f37f0f02993 to your computer and use it in GitHub Desktop.
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 UnpredictableString < String | |
def scramble | |
self.split("").shuffle.join("") | |
end | |
end | |
sentence = UnpredictableString.new("It was a dark and stormy night.") | |
puts sentence | |
puts sentence.scramble |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment