Module: ArchUnit::Files::FluentApi::FileRuleSupport

Defined in:
lib/archunit/files/fluentapi/file_rule_support.rb

Overview

Shared file selection for executable rule terminals.

Class Method Summary collapse

Class Method Details

.selected_nodes(graph, filters) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/archunit/files/fluentapi/file_rule_support.rb', line 13

def selected_nodes(graph, filters)
  nodes = Common::Projection.project_to_nodes(graph)
  return nodes if filters.empty?

  nodes.select do |node|
    Common::PatternMatching.matches_all_patterns?(node.label, filters)
  end
end