Class: Hoygancop::Rules::TooMuchMarks

Inherits:
Object
  • Object
show all
Includes:
SimpleRule
Defined in:
lib/hoygancop/rules/too_much_marks.rb

Instance Method Summary collapse

Methods included from SimpleRule

#hoygan?, #initialize, #report

Instance Method Details

#correctObject



8
9
10
11
# File 'lib/hoygancop/rules/too_much_marks.rb', line 8

def correct
  corrected = @text.gsub(/[!]{1,}/i, "!").gsub(/[?]{3,}/i, "!")
  corrected
end