Sha256: a99fa703ef90d2661452756e32b4be7c3f38f32281e521983829dd6c3bada5df

Contents?: true

Size: 704 Bytes

Versions: 5

Compression:

Stored size: 704 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 Framework
    # Used to map version strings from frameworks to ApplicationUpdate dtm
    class PlatformVersion
      attr_reader :major, :minor, :patch
      def initialize major, minor, patch
        @major = major || ''
        @minor = minor || ''
        @patch = patch || ''
      end

      def self.from_string platform_version_string
        version_array = platform_version_string.split(Contrast::Utils::ObjectShare::PERIOD)
        new(version_array[0], version_array[1], version_array[2])
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
contrast-agent-3.10.2 lib/contrast/framework/platform_version.rb
contrast-agent-3.10.1 lib/contrast/framework/platform_version.rb
contrast-agent-3.10.0 lib/contrast/framework/platform_version.rb
contrast-agent-3.9.1 lib/contrast/framework/platform_version.rb
contrast-agent-3.9.0 lib/contrast/framework/platform_version.rb