Skip to content

Instantly share code, notes, and snippets.

@yonkeltron
Created August 9, 2010 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yonkeltron/515598 to your computer and use it in GitHub Desktop.
Save yonkeltron/515598 to your computer and use it in GitHub Desktop.
def make_camel_case(underscored_text)
out_string = ''
underscored_text.split('_').each_with_index {|w, i| i > 0 ? out_string << w.capitalize : out_string << w }
out_string
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment