lib/global_types/semantic_version.rb
# Build a semantic version string from a hash.
#
# @see VERSION_HASH
# @param [String] major
# @param [String] minor
# @param [String] patch
# @param [String, nil] pre
# @param [String, nil] build
# @return [String]
Build a semantic version string from a hash.
Build a semantic version string from a hash .
def version_string_from(major:, minor:, patch:, pre: nil, build: nil)
      [major, minor, patch].join(?.).then do |version|
        pre.present? ? "#{version}-#{pre}" : version
      end.then do |version|
        build.present? ? "#{version}+#{build}" : version
      end
    end
def version_string_from ( major : , minor : , patch : , pre : nil , build : nil ) [ major , minor , patch ] . join ( ?. ) . then do | version | pre . present? ? "#{version}-#{pre}" : version end . then do | version | build . present? ? "#{version}+#{build}" : version end end
Build a semantic version string from a hash.
Build a semantic version string from a hash .
# :nocov: # :nocov:
None
String
major
minor
patch
pre
build
None
see
None