Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/kawaii/core_ext/string.rb
Overview
Extend String class.
Instance Method Summary (collapse)
Instance Method Details
- (Object) camelcase
3 4 5 |
# File 'lib/kawaii/core_ext/string.rb', line 3 def camelcase gsub(/(?<=_|^)(\w)/) { Regexp.last_match[1].upcase }.gsub(/(?:_)(\w)/, '\1') end |