lib/contrast/agent/patching/policy/trigger_node.rb in contrast-agent-6.2.0 vs lib/contrast/agent/patching/policy/trigger_node.rb in contrast-agent-6.3.0

- old
+ new

@@ -39,10 +39,11 @@ def node_class NODE end + # @raise [ArgumentError] Validates if the created nodes have everything that we'll need now or later on. def validate super unless applicator.public_methods(false).any?(applicator_method) raise(ArgumentError, "#{ id } did not have a proper applicator method: "\ @@ -50,10 +51,11 @@ end validate_properties validate_rule end + # @raise [ArgumentError] Validates if the created nodes have everything that we'll need now or later on. def validate_properties if (required_properties & optional_properties).any? raise(ArgumentError, "#{ rule_id } had overlapping elements between required and optional properties. Unable to create.") end @@ -64,9 +66,10 @@ return unless (required_properties - properties.keys).any? raise(ArgumentError, "#{ id } did not have a required property. Unable to create.") end + # @raise [ArgumentError] Validates if the created nodes have everything that we'll need now or later on. def validate_rule raise(ArgumentError, 'Unknown rule did not have a proper name. Unable to create.') unless rule_id raise(ArgumentError, "#{ id } did not have a proper applicator. Unable to create.") unless applicator unless applicator_method