# Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/agent/assess/contrast_event' require 'contrast/agent/assess/events/source_event' module Contrast module Agent module Assess module Events # This module returns the event type appropriate to the given Node module EventFactory def self.build policy_node, tagged, object, ret, args, source_type = nil, source_name = nil case policy_node when Contrast::Agent::Assess::Policy::SourceNode Contrast::Agent::Assess::Events::SourceEvent.new(policy_node, tagged, object, ret, args, source_type, source_name) when Contrast::Agent::Assess::Policy::PolicyNode Contrast::Agent::Assess::ContrastEvent.new(policy_node, tagged, object, ret, args) end end end end end end end