Sha256: 05600cbad8279f2ddb80ee1d818040973a1e9068c104251246b0f8c8a422ae59

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

module Pedantic::Unimportant
  def self.included(base)
    base.processors :remove_unimportant_words
  end
  
  def remove_unimportant_words(string)
    %w(
      a again all along also an and are as at but by came can cant couldnt did 
      didn didnt do doesntdont ever first from have her here him how i if in 
      into is isnt it itll just last least like most my new no not now of on or
      should sinc so some th than this that the their then those to told too
      true try until url us were when whether while with within yes you youll
    ).each { |word|
      string.gsub!(/\b#{word}\b/, '')
    }
    
    string
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pedantic-0.1.0 lib/pedantic/unimportant.rb