Class: T::Types::FixedHash

Inherits:
Object
  • Object
show all
Defined in:
lib/tapioca/sorbet_ext/fixed_hash_patch.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/tapioca/sorbet_ext/fixed_hash_patch.rb', line 7

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