Class: Catify

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

Class Method Summary collapse

Class Method Details

.it(phrase) ⇒ Object



42
43
44
45
46
47
48
49
50
# File 'lib/catify.rb', line 42

def self.it(phrase)
  phrase.downcase.split(' ').map do |word|
    if CONVERT_HASH.include?(word)
      CONVERT_HASH[word]
    else
      word
    end
  end.join(' ').capitalize
end