class ArchSpec::Rules::Naming::Forbidden
Forbids any selected method from existing. Rule id naming.forbidden.
Public Class Methods
Source
# File lib/archspec/rules/naming_rules.rb, line 69 def initialize(because: nil) @because = because end
Public Instance Methods
# File lib/archspec/rules/naming_rules.rb, line 77 def diagnostics(selected, rule, _graph) selected.map do |definition, _match| Diagnostic.new( rule: id, message: message_for(definition), location: definition.location, evidence: "#{definition.owner} defines #{definition.scope} method #{definition.name} (#{rule.selector.describe})" ) end end