Class: String

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

Instance Method Summary collapse

Instance Method Details

#classifyObject

Turns a lower_case_underscored_name into an UpperCaseCamelCaseName



3
4
5
# File 'lib/ext/string.rb', line 3

def classify
  self.gsub("_", " ").gsub(/\b('?[a-z])/) { $1.capitalize }.gsub(" ", "")
end