Class: StyleScanner::SentenceScans::UglyWord
- 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
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from StyleScanner::SentenceScans::Base
Instance Method Details
#scan ⇒ Object
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 |