Sha256: f4448372211b6694410224ef57672669277f7a5643187c3864f0b36ef9dd03fa

Contents?: true

Size: 416 Bytes

Versions: 72

Compression:

Stored size: 416 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

72 entries across 72 versions & 1 rubygems

Version Path
synvert-core-0.63.1 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.63.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.62.1 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.62.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.61.2 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.61.1 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.61.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.60.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.59.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.58.3 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.58.2 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.58.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.57.1 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.57.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.56.1 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.56.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.55.0 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.54.3 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.54.2 lib/synvert/core/rewriter/condition/if_exist_condition.rb
synvert-core-0.54.1 lib/synvert/core/rewriter/condition/if_exist_condition.rb