Module: FastCamelize::ActiveSupportStringPatch
- Defined in:
- lib/fast_camelize.rb
Overview
Override String#camelize if we need to get back to the original behavior that fast_camelize overroad.
Instance Method Summary collapse
Instance Method Details
#camelize(first_letter = :upper) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fast_camelize.rb', line 38 def camelize(first_letter = :upper) case first_letter when :upper ActiveSupport::Inflector.camelize(self, true) when :lower ActiveSupport::Inflector.camelize(self, false) else # Skipping here because Steep doesn't understand that this is going to # be included into a class that has Kernel included. __skip__ = begin raise ArgumentError, 'Invalid option, use either :upper or :lower.' end end end |