Sha256: 379e3e223389eafaafe5952e67ef3e031b49e5cb29face454c1fd7aba83fd267
Contents?: true
Size: 395 Bytes
Versions: 12
Compression:
Stored size: 395 Bytes
Contents
# frozen_string_literal: true class PreviewService class << self def read_deployment_id(deployment_name) return nil unless deployment_name.start_with?('deployment-') return nil unless deployment_name.split('-').size == 2 deployment_id = deployment_name.split('-').last return nil if deployment_id.to_i.to_s != deployment_id deployment_id end end end
Version data entries
12 entries across 12 versions & 1 rubygems