Class: StyleScanner::SentenceScans::UglyWord

Inherits:
Base
  • Object
show all
Defined in:
lib/style_scanner/sentence_scans/ugly_word.rb

Constant Summary collapse

WORD_PAIRS =
{"utilize" => "use", "necessitate" => "require", "leverage" => "use", "aforementioned" => "previous",
"transpire" => "happen", "thusly" => "thus", "whilst" => "while", "tackle" => "solve"}

Instance Attribute Summary

Attributes inherited from Base

#sentence

Instance Method Summary collapse

Methods inherited from Base

#initialize, load_file, scan

Constructor Details

This class inherits a constructor from StyleScanner::SentenceScans::Base

Instance Method Details

#scanObject



8
9
10
11
12
# File 'lib/style_scanner/sentence_scans/ugly_word.rb', line 8

def scan
  WORD_PAIRS.keys.each do |offender|
    create_problem("replace #{offender} with #{replacement_word(offender)}") if sentence.contains?(offender) 
  end
end