Module: T::Hash

Defined in:
lib/types/_types.rb

Class Method Summary collapse

Class Method Details

.[](keys, values) ⇒ Object



294
295
296
297
298
299
300
# File 'lib/types/_types.rb', line 294

def self.[](keys, values)
  if keys.is_a?(T::Types::Untyped) && values.is_a?(T::Types::Untyped)
    T::Types::TypedHash::Untyped.new
  else
    T::Types::TypedHash.new(keys: keys, values: values)
  end
end