Sha256: 42c9de7b4531d991b98b991bf8adbc7ab4da4b8bd04381e107e17e21ac72142e

Contents?: true

Size: 559 Bytes

Versions: 14

Compression:

Stored size: 559 Bytes

Contents

# typed: strict

module ModularizationStatistics
  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

14 entries across 14 versions & 1 rubygems

Version Path
modularization_statistics-2.0.2 lib/modularization_statistics/tags.rb
modularization_statistics-2.0.1 lib/modularization_statistics/tags.rb
modularization_statistics-2.0.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.43.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.42.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.41.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.40.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.39.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.38.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.37.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.36.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.35.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.34.0 lib/modularization_statistics/tags.rb
modularization_statistics-1.33.0 lib/modularization_statistics/tags.rb