Class: Syntaxer::PlainChecker

Inherits:
Checker
  • Object
show all
Defined in:
lib/syntaxer/checker.rb

Instance Attribute Summary

Attributes inherited from Checker

#reader, #syntaxer

Instance Method Summary collapse

Methods inherited from Checker

process

Constructor Details

#initialize(syntaxer) ⇒ PlainChecker

Returns a new instance of PlainChecker.



116
117
118
# File 'lib/syntaxer/checker.rb', line 116

def initialize syntaxer
  super syntaxer, syntaxer.reader.files_count(syntaxer)
end

Instance Method Details

#processObject

Check syntax in indicated directory

See Also:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/syntaxer/checker.rb', line 124

def process
  @deferred_process = []
  @reader.rules.each do |rule|
    if rule.deferred
      @deferred_process << rule
    else
      rule.files_list(@syntaxer.root_path).each do |file|
        check(rule, file)
      end
    end
  end
  
  @deferred_process.each do |rule|
    rule.exec_rule.run(@syntaxer.root_path, rule.files_list(@syntaxer.root_path))
  end
  
  self
end