Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/filebase.rb

Instance Method Summary collapse

Instance Method Details

#camel_caseObject



11
12
13
# File 'lib/filebase.rb', line 11

def camel_case
  gsub(/(_)(\w)/) { $~[2].upcase }.gsub(/^([a-z])/) { $~[1].upcase }
end