Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/glyph/system_extensions.rb

Overview

Core String class.

Instance Method Summary collapse

Instance Method Details

#title_caseObject

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