Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/gg_check.rb
Overview
Patch String to have a nice camel_case function
Instance Method Summary collapse
Instance Method Details
#camel_case ⇒ Object
167 168 169 170 |
# File 'lib/gg_check.rb', line 167 def camel_case return self if self !~ /_/ && self =~ /[A-Z]+.*/ split('_').map{|e| e.capitalize}.join end |