Sha256: 0b59107533c3da852a9591f5a4f590490e59c7d2877b8a93e700aa67b2bf88b4
Contents?: true
Size: 1.38 KB
Versions: 3
Compression:
Stored size: 1.38 KB
Contents
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true cs__scoped_require 'set' cs__scoped_require 'base64' cs__scoped_require 'contrast/utils/prevent_serialization' cs__scoped_require 'contrast/agent/assess/property/evented' cs__scoped_require 'contrast/agent/assess/property/tagged' module Contrast module Agent module Assess # Properties associated with a tracked String. If String is monkey # patched this object is lazily generated on affected Strings. # # This class acts as a holder for the Assess information we need in order # to properly convey the events that lead up to the state of the tracked # user input. class Properties include Contrast::Utils::PreventSerialization include Contrast::Agent::Assess::Property::Evented include Contrast::Agent::Assess::Property::Tagged # CONTRAST-36937 # Creating these on Properties is expensive. We want to delay this for # as long as possible. def properties @_properties ||= {} end def add_properties hash return unless hash properties.merge!(hash) end def add_property name, value return unless name && value properties[name] = value end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
contrast-agent-3.13.2 | lib/contrast/agent/assess/properties.rb |
contrast-agent-3.13.1 | lib/contrast/agent/assess/properties.rb |
contrast-agent-3.13.0 | lib/contrast/agent/assess/properties.rb |