Sha256: 204bd1fbd062f6c7325cc642e3dc88002b1acc8be9a6ffee706c18a9cc4acb82
Contents?: true
Size: 923 Bytes
Versions: 14
Compression:
Stored size: 923 Bytes
Contents
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/utils/string_utils' module Contrast module Api module Decorators # Used to decorate the {Contrast::Api::Dtm::Activity} protobuf model # to handle conversion between framework route classes and the dtm. module Activity def self.included klass klass.extend(ClassMethods) end # Class methods for Activity module ClassMethods def source_or_string obj if obj.cs__is_a?(Regexp) obj.source elsif obj.cs__respond_to?(:safe_string) obj.safe_string else obj.to_s end end end end end end end Contrast::Api::Dtm::Activity.include(Contrast::Api::Decorators::Activity)
Version data entries
14 entries across 14 versions & 1 rubygems