Class: StyleScanner::SentenceScans::ConsecutivelyRepeatedWord

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

Constant Summary collapse

REPEATED_WORD_REGEX =
/\b(\w+)\b\s+\b\1\b/

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



7
8
9
10
11
# File 'lib/style_scanner/sentence_scans/consecutively_repeated_word.rb', line 7

def scan
  consecutively_repeated_words.each do |repeated_word|
    create_problem("#{repeated_word} #{repeated_word}")
  end 
end