Module: Contrast::Agent::Assess::Property::Evented

Included in:
Contrast::Agent::Assess::Properties
Defined in:
lib/contrast/agent/assess/property/evented.rb

Overview

This module serves to hold the functionality required for the management of our dataflow events.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



16
17
18
# File 'lib/contrast/agent/assess/property/evented.rb', line 16

def event
  @event
end

Instance Method Details

#build_event(event_data, source_type = nil, source_name = nil) ⇒ Object

Create a new event and add it to the event set.

Parameters:

  • event_data (Contrast::Agent::Assess::Events::EventData)
  • source_type (String) (defaults to: nil)

    the type of this source, from the source_node, or a KEY_TYPE if invoked for a map

  • source_name (String, nil) (defaults to: nil)

    the name of this source, i.e. the key used to accessed if from a map or nil if a type like BODY



26
27
28
29
# File 'lib/contrast/agent/assess/property/evented.rb', line 26

def build_event event_data, source_type = nil, source_name = nil
  @event = Contrast::Agent::Reporting::FindingEvent.new(event_data, source_type, source_name)
  report_sources(event_data.tagged, @event)
end