Class: Guideline::HashCommaChecker

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

Defined Under Namespace

Classes: HashParser

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/hash_comma_checker.rb', line 5

def check(path)
  HashParser.parse(path.read) do |line|
    report(
      :message => "There should be a comma after the last value of Hash",
      :line    => line,
      :path    => path
    )
  end
end