Created
October 17, 2012 06:26
-
-
Save tomoyamkung/3904014 to your computer and use it in GitHub Desktop.
[Ruby]CamelCase に変換するスニペット
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 camelize string | |
string.split('-').map do |word| | |
word.capitalize | |
end.join | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment