Sha256: 7afebc0157ae1e9cbe966b9cf09bd3d14bda6f715ae92ce555f89864cf8c310c
Contents?: true
Size: 544 Bytes
Versions: 12
Compression:
Stored size: 544 Bytes
Contents
# typed: strict module PackStats module Tags extend T::Sig sig { params(colon_delimited_tag_strings: T::Array[String]).returns(T::Array[Tag]) } def self.for(colon_delimited_tag_strings) colon_delimited_tag_strings.map do |colon_delimited_tag_string| key, value = colon_delimited_tag_string.split(':') raise StandardError, "Improperly formatted tag `#{colon_delimited_tag_string}`" if key.nil? || value.nil? Tag.new( key: key, value: value ) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems