Sha256: 72a4cc2a2d40acea46d2d86dfcd5e8be5915b80ea227d379e78d6c07069411f6
Contents?: true
Size: 478 Bytes
Versions: 13
Compression:
Stored size: 478 Bytes
Contents
# frozen_string_literal: true module Synvert::Core # UnlessExistCondition checks if matching node doesn't exist in the node children. class Rewriter::UnlessExistCondition < Rewriter::Condition private # check if none of child node matches the rules. # # return [Boolean] def match? match = false @instance.current_node.recursive_children do |child_node| match ||= child_node&.match?(@rules) end !match end end end
Version data entries
13 entries across 13 versions & 1 rubygems