Class: Guideline::LongLineChecker

Inherits:
Checker
  • Object
show all
Defined in:
lib/guideline/checkers/long_line_checker.rb

Defined Under Namespace

Classes: LineChecker

Constant Summary collapse

DEFAULT_MAX =
80

Instance Method Summary collapse

Methods inherited from Checker

#errors, #has_error?, #initialize, #report

Constructor Details

This class inherits a constructor from Guideline::Checker

Instance Method Details

#check(path) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/guideline/checkers/long_line_checker.rb', line 5

def check(path)
  lines(path).select(&:has_error?).each do |line|
    report(
      :line    => line.lineno,
      :message => line.message,
      :path    => path
    )
  end
end