Sha256: aeab3539da64e7f2ef2b83510868da77cd336c6ca80d0d67bfa820f9b82a4beb
Contents?: true
Size: 613 Bytes
Versions: 11
Compression:
Stored size: 613 Bytes
Contents
module Roodi module Core class CheckingVisitor def initialize(*checks) @checks ||= {} checks.first.each do |check| nodes = check.interesting_nodes nodes.each do |node| @checks[node] ||= [] @checks[node] << check @checks[node].uniq! end end end def visit(node) @last_newline = node if node.node_type == :newline checks = @checks[node.node_type] checks.each {|check| check.evaluate_node_at_line(node, @last_newline)} unless checks.nil? nil end end end end
Version data entries
11 entries across 11 versions & 1 rubygems