class Covered::Source
def expand(node, coverage, level = 0)
def expand(node, coverage, level = 0) if node.is_a? Parser::AST::Node if ignore?(node) # coverage.annotate(node.location.line, "ignoring #{node.type}") else if executable?(node) # coverage.annotate(node.location.line, "executable #{node.type}") coverage.counts[node.location.line] ||= 0 elsif node.location # coverage.annotate(node.location.line, "not executable #{node.type}") rescue nil end if node.type == :send # coverage.annotate(node.location.line, "ignoring #{node.type} children") end expand(node.children, coverage, level + 1) end elsif node.is_a? Array node.each do |child| expand(child, coverage, level) end else return false end end