Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/classiphier/extensions/string.rb

Instance Method Summary collapse

Instance Method Details

#wordsObject



2
3
4
5
6
# File 'lib/classiphier/extensions/string.rb', line 2

def words
  result = downcase.gsub(/[^\w\s]/, '').split
  result.delete_if { |w| w.size <= 2 }
  result.map(&:stem)
end