lib/contrast/agent/deadzone/policy/policy.rb in contrast-agent-4.5.0 vs lib/contrast/agent/deadzone/policy/policy.rb in contrast-agent-4.6.0

- old
+ new

@@ -6,12 +6,12 @@ module Contrast module Agent module Deadzone module Policy - # This is just a holder for our policy. Takes the policy JSON and - # converts it into hashes that we can access nicely + # This is just a holder for our policy. Takes the policy JSON and converts it into hashes that we can access + # nicely. class Policy < Contrast::Agent::Patching::Policy::Policy def self.policy_folder 'deadzone' end @@ -31,9 +31,13 @@ policy_data = JSON.parse(string) policy_data[DEADZONES_KEY].each do |deadzone_hash| add_node(node_type.new(deadzone_hash)) end + end + + def module_names + @_module_names ||= Set.new(deadzones.map(&:class_name)) end def add_node node, _node_type = :deadzones unless node logger.error('Node was nil when adding node to policy')