Sha256: 1679e8b08ddefbaf0474e545e1326ee6293c272ab93a290dbd6972fd9bc63f80

Contents?: true

Size: 359 Bytes

Versions: 5

Compression:

Stored size: 359 Bytes

Contents

# typed: true
# frozen_string_literal: true

module T
  module Types
    class FixedHash
      def name
        entries = @types.map do |(k, v)|
          if Symbol === k && ":#{k}" == k.inspect
            "#{k}: #{v}"
          else
            "#{k.inspect} => #{v}"
          end
        end

        "{#{entries.join(', ')}}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tapioca-0.4.27 lib/tapioca/sorbet_ext/fixed_hash_patch.rb
tapioca-0.4.26 lib/tapioca/sorbet_ext/fixed_hash_patch.rb
tapioca-0.4.25 lib/tapioca/sorbet_ext/fixed_hash_patch.rb
tapioca-0.4.24 lib/tapioca/sorbet_ext/fixed_hash_patch.rb
tapioca-0.4.23 lib/tapioca/sorbet_ext/fixed_hash_patch.rb