Sha256: ae57c30456d62120dc26b342344b6e28648b0beee9850b09eed4c354667901ce
Contents?: true
Size: 976 Bytes
Versions: 13
Compression:
Stored size: 976 Bytes
Contents
# Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true module Contrast module Api module Decorators # Used to decorate the {Contrast::Api::Dtm::RaspRuleSample} protobuf # model. module RaspRuleSample def self.included klass klass.extend(ClassMethods) end # Used to add class methods to RaspRuleSample module ClassMethods def build context, ia_result sample = new sample.timestamp_ms = context.timer.start_ms sample.user_input = Contrast::Api::Dtm::UserInput.build_from_ia_result(ia_result) sample.user_input.document_type = Contrast::Utils::StringUtils.force_utf8(context.request.document_type) sample end end end end end end Contrast::Api::Dtm::RaspRuleSample.include(Contrast::Api::Decorators::RaspRuleSample)
Version data entries
13 entries across 13 versions & 1 rubygems