Method: Moon::Utility::String.camelize
- Defined in:
- lib/moon/utility/string.rb
.camelize(lower_case_and_underscored_word) ⇒ Object
4 5 6 |
# File 'lib/moon/utility/string.rb', line 4 def self.camelize(lower_case_and_underscored_word) lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::#{$1}".upcase }.gsub(/(?:^|_)(.)/) { $1.upcase } end |