module TurkishSupport

The TurkishSupport module responsible for making some String and Array methods compatible with Turkish language by using Ruby language's refinements feature.

You can check refinements at docs.ruby-lang.org/en/master/doc/syntax/refinements_rdoc.html

Refined Methods

Constants

CASE_METHODS
REGEX_METHODS
VERSION

Public Instance Methods

titleize() click to toggle source

capitalize all words and returns a copy of the string

@return [String]

# File lib/turkish_support/string_methods.rb, line 20
def titleize
  downcase.gsub(/\b\S/u).each { _1.upcase }
end
titleize!() click to toggle source

capitalize all words in place @return [String]

# File lib/turkish_support/string_methods.rb, line 26
def titleize!
  replace(titleize)
end