Class: NBClass::Utils

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

Class Method Summary collapse

Class Method Details

.break_phrase_in_word_array(phrase) ⇒ Object



3
4
5
6
7
8
# File 'lib/nb_class/utils.rb', line 3

def self.break_phrase_in_word_array(phrase)
  [",", ":", "?", "!", ";", ".", "/", "|"].each do |elem|
    phrase = phrase.gsub(elem,"")
  end
  phrase.split
end