# 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