Sha256: 102ca460ac6802c733cf5d78a490e0e15a4aa3b7c07b9aadca76ccbec12ead36

Contents?: true

Size: 147 Bytes

Versions: 4

Compression:

Stored size: 147 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
classiphier-0.1.3 lib/classiphier/extensions/string.rb
classiphier-0.1.2 lib/classiphier/extensions/string.rb
classiphier-0.1.1 lib/classiphier/extensions/string.rb
classiphier-0.1.0 lib/classiphier/extensions/string.rb