Class: Cache::Client::Utils

Inherits:
Object
  • Object
show all
Defined in:
lib/cache-client/utils.rb

Class Method Summary collapse

Class Method Details

.camelize_string(str) ⇒ Object



3
4
5
# File 'lib/cache-client/utils.rb', line 3

def self.camelize_string(str)
  str.gsub('-', '_').sub(/^[a-z\d]*/) { $&.capitalize }.gsub(/(?:_|(\/))([a-z\d]*)/i) {$2.capitalize}
end