Method: NewRelic::Agent::RulesEngine.reject_rules_with_duplicate_prefixes!

Defined in:
lib/new_relic/agent/rules_engine.rb

.reject_rules_with_duplicate_prefixes!(rules) ⇒ Object

When multiple rules share the same prefix, only apply the rule with the last instance of the prefix. Note that the incoming rules are in reverse order to facilitate this.


53
54
55
# File 'lib/new_relic/agent/rules_engine.rb', line 53

def self.reject_rules_with_duplicate_prefixes!(rules)
  rules.uniq! { |rule| rule.prefix }
end