Sha256: 0c2e8be29d86f47eaa5344f28b9df023f19bc5762cf181e467ad506948dd6a7b
Contents?: true
Size: 945 Bytes
Versions: 3
Compression:
Stored size: 945 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 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
3 entries across 3 versions & 1 rubygems