Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/bandwidth/string_patch.rb
Instance Method Summary collapse
Instance Method Details
#camelize ⇒ Object
2 3 4 |
# File 'lib/bandwidth/string_patch.rb', line 2 def camelize self.split(/[^a-z0-9]/i).map{ |w| w[0, 1].upcase + w[1..-1] }.join end |
#uncapitalize ⇒ Object
6 7 8 |
# File 'lib/bandwidth/string_patch.rb', line 6 def uncapitalize self.sub(/^(.)/) { |m| m.downcase } end |