Module: Contrast::Agent::Assess::Policy::Propagator::Custom
- Extended by:
- Utils::Assess::EventLimitUtils
- Defined in:
- lib/contrast/agent/assess/policy/propagator/custom.rb
Overview
Propagation that results in some complex or specific translation of tags from the source to the target. Each node with the CUSTOM action knows the class and method it should call to preform this action.
Class Method Summary collapse
-
.propagate(propagation_node, preshift, ret, block) ⇒ Object
The return value of the method.
Methods included from Utils::Assess::EventLimitUtils
event_limit?, event_limit_for_rule?, increment_event_count
Methods included from Components::Logger::InstanceMethods
Class Method Details
.propagate(propagation_node, preshift, ret, block) ⇒ Object
Returns the return value of the method.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/contrast/agent/assess/policy/propagator/custom.rb', line 26 def propagate propagation_node, preshift, ret, block clazz = propagation_node.patch_class method = propagation_node.patch_method # We cannot flip the String to a Module at patcher creation time - # the Module may not exist yet. Instead, we have to defer until the # first time the patcher is used. if clazz.is_a?(String) clazz = Object.cs__const_get(clazz) propagation_node.patch_class = clazz end clazz.send(method, propagation_node, preshift, ret, block) increment_event_count(propagation_node) end |