Class: ConfigurationRule

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/models/configuration_rule.rb

Overview

A rule for a given configuration group

Instance Method Summary collapse

Instance Method Details

#match_agent?(agent) ⇒ Boolean

Return true if this rule matches the given agent

Returns:

  • (Boolean)


26
27
28
# File 'lib/models/configuration_rule.rb', line 26

def match_agent?(agent)
  active? && match_platform?(agent) && (platform_rule? || match_constraint_rule?(agent))
end