Sha256: e2d2b7b39e7c30e942bf587a90f004bbf12fe1f5224e9e41531e3a05ee172ad4

Contents?: true

Size: 972 Bytes

Versions: 11

Compression:

Stored size: 972 Bytes

Contents

# Copyright (c) 2020 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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
contrast-agent-4.4.1 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-4.4.0 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-4.3.2 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-4.3.1 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-4.3.0 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-4.2.0 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-4.1.0 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-4.0.0 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-3.16.0 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-3.15.0 lib/contrast/agent/assess/events/event_factory.rb
contrast-agent-3.14.0 lib/contrast/agent/assess/events/event_factory.rb