Module: BDDGen::Extensions::String
- Defined in:
- lib/bddgen/extensions/string.rb
Instance Method Summary collapse
-
#camelize ⇒ Object
This is a really simple stupid method that can’t handle much besides strings that have spaces, dashes, or underscores.
Instance Method Details
#camelize ⇒ Object
This is a really simple stupid method that can’t handle much besides strings that have spaces, dashes, or underscores.
6 7 8 |
# File 'lib/bddgen/extensions/string.rb', line 6 def camelize self.capitalize.gsub(/[ _\-]+([a-z])?/) { $1.upcase } end |