module ArchSpec::DSL
An Archspec.rb file is evaluated in this context, so every method here is a top-level call in that file.
Public Class Methods
# File lib/archspec/dsl.rb, line 13 def self.assert_known_components!(definition, names, for_rule:) unknown = Array(names).flatten.compact.map(&:to_sym).reject { |name| definition.component?(name) }.uniq.sort return if unknown.empty? label = unknown.length == 1 ? 'component' : 'components' raise Error, "#{for_rule} references unknown #{label}: #{unknown.join(', ')}" end
Raises when any of names is not a declared component. Shared by the top-level DSL and the component proxies.