Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/glyph/system_extensions.rb
Overview
Core String class.
Instance Method Summary collapse
-
#title_case ⇒ Object
Converts the strings to “title case” (capitalizes each word).
Instance Method Details
#title_case ⇒ Object
Converts the strings to “title case” (capitalizes each word).
12 13 14 |
# File 'lib/glyph/system_extensions.rb', line 12 def title_case self.snake_case.split('_').map{|s| s.capitalize}.join(' ') end |