Sha256: d23e082a8baa8b6d9effab6263ff21d1cf61be07d347547a774b79b52407a695
Contents?: true
Size: 459 Bytes
Versions: 13
Compression:
Stored size: 459 Bytes
Contents
# frozen_string_literal: true module Synvert::Core # IfExistCondition checks if matching node exists in the node children. class Rewriter::IfExistCondition < Rewriter::Condition private # check if any 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