Method: Animoto::Support::String#camelize

Defined in:
lib/animoto/support/string.rb

#camelizeString

Transforms this string from underscore-form to camel case. Capitalizes the first letter.

Examples:

"this_is_a_underscored_string" # => "ThisIsAUnderscoredString"

Returns:

  • (String)

    the camel case form of this string



12
13
14
# File 'lib/animoto/support/string.rb', line 12

def camelize
  self.gsub(/(?:^|_)(.)/) { $1.upcase }
end