class Synvert::Core::Rewriter::IfExistCondition
IfExistCondition
checks if matching node exists in the node children.
Public Instance Methods
match?()
click to toggle source
check if any child node matches the rules.
# File lib/synvert/core/rewriter/condition/if_exist_condition.rb, line 7 def match? match = false @instance.current_node.recursive_children do |child_node| match ||= child_node&.match?(@rules) end match end