Created
February 19, 2012 03:21
-
-
Save ageekymonk/1861800 to your computer and use it in GitHub Desktop.
Ruby snippets
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 reverse_word str | |
str.reverse.split(" ").map { |n| n.reverse }.join(" ") | |
end | |
reverse_word "This is really awesome" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment