class FindKeywords::RemoveWordsList

Attributes

word_list[R]

Public Class Methods

all() click to toggle source
# File lib/find_keywords/remove_words_list.rb, line 60
def self.all
  all_custom + stop_words
end
all_custom() click to toggle source
# File lib/find_keywords/remove_words_list.rb, line 64
def self.all_custom
  all_words = []
  @@instance_collector.each do | words |
    words.word_list.each do | word |
      all_words << word
    end
  end
  all_words
end
new(word_list) click to toggle source
# File lib/find_keywords/remove_words_list.rb, line 47
def initialize (word_list)
  if word_list.is_a?(String)
    @word_list = word_list.split(" ")
  elsif word_list.is_a?(Array)
    @word_list = word_list
  elsif word_list.is_a?(Hash)
    @word_list = word_list.collect { |k, v| "#{k} #{v} " }.join.split(" ")
  else
    @word_list = []
  end
  @@instance_collector << self
end
stop_words() click to toggle source
# File lib/find_keywords/remove_words_list.rb, line 74
def self.stop_words
  STOP_WORDS
end