Module: Octiron::Support::CamelCase
- Included in:
- Identifiers
- Defined in:
- lib/octiron/support/camel_case.rb
Overview
Instance Method Summary collapse
-
#camel_case(underscored_name) ⇒ String
Takes an underscored name and turns it into a CamelCase String.
Instance Method Details
#camel_case(underscored_name) ⇒ String
Takes an underscored name and turns it into a CamelCase String
20 21 22 23 24 |
# File 'lib/octiron/support/camel_case.rb', line 20 def camel_case(underscored_name) return underscored_name.to_s.split("_").map do |word| word.upcase[0] + word[1..-1] end.join end |