Sha256: 40f11e06f29818543d19b9418286f654c4e673ca88621e998c47d8e41a0e5c28
Contents?: true
Size: 956 Bytes
Versions: 38
Compression:
Stored size: 956 Bytes
Contents
Foobara.require_project_file( "type_declarations", "handlers/extend_registered_type_declaration/to_type_transformer" ) module Foobara module TypeDeclarations module Handlers class ExtendAssociativeArrayTypeDeclaration < ExtendRegisteredTypeDeclaration class ToTypeTransformer < ExtendRegisteredTypeDeclaration::ToTypeTransformer def transform(strict_type_declaration) super.tap do |type| key_type_declaration = type.declaration_data[:key_type_declaration] value_type_declaration = type.declaration_data[:value_type_declaration] if key_type_declaration || value_type_declaration type.element_types = [ type_for_declaration(key_type_declaration || :duck), type_for_declaration(value_type_declaration || :duck) ] end end end end end end end end
Version data entries
38 entries across 38 versions & 1 rubygems