Class: String
Constant Summary
Constants included
from TitleCase
TitleCase::SMALL_WORDS_RE
Instance Method Summary
collapse
Methods included from TitleCase
#title_case, #titleize_if_appropriate
Instance Method Details
#flatten ⇒ Object
17
18
19
|
# File 'lib/droom/searchability.rb', line 17
def flatten
split(/[^\w\d\']{1,}/).join(' ')
end
|
#remove_stopwords ⇒ Object
21
22
23
|
# File 'lib/droom/searchability.rb', line 21
def remove_stopwords
gsub(STOPWORD_RE, '')
end
|
#searchable ⇒ Object
13
14
15
|
# File 'lib/droom/searchability.rb', line 13
def searchable
downcase.remove_stopwords.flatten
end
|