Module: Peachy::StringStyler::Stripper
- Included in:
- Peachy::StringStyler
- Defined in:
- lib/peachy/string_styler.rb
Instance Method Summary collapse
-
#strip_underscores_and_upcase(string) ⇒ Object
This is a bit rubbish.
Instance Method Details
#strip_underscores_and_upcase(string) ⇒ Object
This is a bit rubbish. Need to include the method somewhere other than the private instance block in StringStyler.
9 10 11 |
# File 'lib/peachy/string_styler.rb', line 9 def strip_underscores_and_upcase string string.gsub(/_([a-z])/){|s| s.upcase}.delete('_') end |