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 30 |
# File 'lib/querly/analyzer.rb', line 16 def run scripts.each do |script| tagging = taggings.find {|tagging| tagging.applicable?(script) } each_subnode script.root_pair do |node_pair| rules.each do |rule| if applicable_rule?(tagging, rule) if rule.patterns.any? {|pattern| test_pair(node_pair, pattern) } yield script, rule, node_pair end end end end end end |