Class: Frekwenza::StopWords

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sw) ⇒ StopWords

Returns a new instance of StopWords.



5
6
7
8
9
10
11
12
# File 'lib/frekwenza/stop_words.rb', line 5

def initialize(sw)
  if sw.kind_of?(String)
    string = read(sw)
    build_list(string)
  else
    @stop_words = sw
  end
end

Instance Attribute Details

#stop_wordsObject (readonly)

Returns the value of attribute stop_words.



3
4
5
# File 'lib/frekwenza/stop_words.rb', line 3

def stop_words
  @stop_words
end