Class: String
Instance Method Summary collapse
- #camelize(first_letter = :upper) ⇒ Object (also: #camelcase)
- #constantize ⇒ Object
- #demodulize ⇒ Object
- #underscore ⇒ Object
Instance Method Details
#camelize(first_letter = :upper) ⇒ Object Also known as: camelcase
3 4 5 6 7 8 9 10 |
# File 'lib/support/string.rb', line 3 def camelize(first_letter = :upper) case first_letter when :upper then ActiveSupport::Inflector.camelize(self, true) when :lower then ActiveSupport::Inflector.camelize(self, false) end end |
#constantize ⇒ Object
14 15 16 |
# File 'lib/support/string.rb', line 14 def constantize ActiveSupport::Inflector.constantize(self) end |
#demodulize ⇒ Object
22 23 24 |
# File 'lib/support/string.rb', line 22 def demodulize ActiveSupport::Inflector.demodulize(self) end |
#underscore ⇒ Object
18 19 20 |
# File 'lib/support/string.rb', line 18 def underscore ActiveSupport::Inflector.underscore(self) end |