Sha256: 1eeaef28a9c04bf6b3b55c870778aa01191b29204a066815c6a69b629d2f4e8e
Contents?: true
Size: 976 Bytes
Versions: 11
Compression:
Stored size: 976 Bytes
Contents
# Copyright (c) 2020 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
11 entries across 11 versions & 1 rubygems