Method: Querly::Analyzer#run
- Defined in:
- lib/querly/analyzer.rb
#run ⇒ Object
yields(script, rule, node_pair)
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/querly/analyzer.rb', line 16 def run scripts.each do |script| rules = config.rules_for_path(script.path) script.root_pair.each_subpair do |node_pair| rules.each do |rule| if rule.match?(identifier: self.rule) if rule.patterns.any? {|pattern| test_pair(node_pair, pattern) } yield script, rule, node_pair end end end end end end |