Class: Contrast::Agent::Assess::Policy::Propagator::Splat
- Defined in:
- lib/contrast/agent/assess/policy/propagator/splat.rb
Overview
Propagation that results in all the tags of the source being applied to the totality of the target. The target’s preexisting tags are unaffected beyond any merging of overlapping tags.
Class Method Summary collapse
-
.propagate(propagation_node, preshift, target) ⇒ Object
propagation action required by this method.
-
.splat_tags(tracked_inputs, target) ⇒ Object
Handles the splatting of tags from the tracked inputs to the target.
Methods inherited from Base
Class Method Details
.propagate(propagation_node, preshift, target) ⇒ Object
propagation action required by this method.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/contrast/agent/assess/policy/propagator/splat.rb', line 19 def propagate propagation_node, preshift, target tracked_inputs = [] propagation_node.sources.each do |source| case source when Contrast::Utils::ObjectShare::OBJECT_KEY tracked_inputs << preshift.object if Contrast::Agent::Assess::Tracker.tracked?(preshift.object) else check_for_buffer(tracked_inputs, preshift.args[source]) find_argument_inputs(tracked_inputs, preshift.args[source]) end end (tracked_inputs, target) Contrast::Agent::Assess::Tracker.properties(target)&. end |
.splat_tags(tracked_inputs, target) ⇒ Object
Handles the splatting of tags from the tracked inputs to the target.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/contrast/agent/assess/policy/propagator/splat.rb', line 41 def tracked_inputs, target return if tracked_inputs.empty? return unless (properties = Contrast::Agent::Assess::Tracker.properties!(target)) tracked_inputs.each do |input| input_properties = Contrast::Agent::Assess::Tracker.properties(input) next unless input_properties properties.splat_from(input, target) end end |