Sha256: 2423afc02a5e2943a6b8ea23f633ed6a254c7e4b569beeae8bde07646c02d2ac
Contents?: true
Size: 418 Bytes
Versions: 4
Compression:
Stored size: 418 Bytes
Contents
# frozen_string_literal: true module Synvert::Core # IfExistCondition checks if matching node exists in the node children. class Rewriter::IfExistCondition < Rewriter::Condition # check if any child node matches the rules. 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
4 entries across 4 versions & 1 rubygems