Method: Gyoku::CoreExt::String#camelcase
- Defined in:
- lib/gyoku/core_ext/string.rb
#camelcase ⇒ Object
Returns the String in CamelCase.
11 12 13 |
# File 'lib/gyoku/core_ext/string.rb', line 11 def camelcase self.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } end |