Method: Hanami::Utils::String.titleize
- Defined in:
- lib/hanami/utils/string.rb
.titleize(input) ⇒ ::String
Returns a titleized version of the string
157 158 159 160 |
# File 'lib/hanami/utils/string.rb', line 157 def self.titleize(input) string = ::String.new(input.to_s) underscore(string).split(CLASSIFY_SEPARATOR).map(&:capitalize).join(TITLEIZE_SEPARATOR) end |