Sha256: 6939782483344e56b3d20737f50cf8ef447c348741b7ea75a689cec55fe40b27

Contents?: true

Size: 640 Bytes

Versions: 27

Compression:

Stored size: 640 Bytes

Contents

Foobara.require_project_file("type_declarations", "handlers/extend_registered_type_declaration")

module Foobara
  module TypeDeclarations
    module Handlers
      class ExtendAssociativeArrayTypeDeclaration < ExtendRegisteredTypeDeclaration
        def applicable?(sugary_type_declaration)
          strictish_type_declaration = desugarize(sugary_type_declaration)

          strictish_type_declaration.is_a?(::Hash) && strictish_type_declaration[:type] == :associative_array
        end

        # TODO: do we really need this? Isn't this the default?
        def priority
          Priority::LOW
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/type_declarations/src/handlers/extend_associative_array_type_declaration.rb
foobara-0.0.6 projects/type_declarations/src/handlers/extend_associative_array_type_declaration.rb
foobara-0.0.5 projects/type_declarations/src/handlers/extend_associative_array_type_declaration.rb
foobara-0.0.4 projects/type_declarations/src/handlers/extend_associative_array_type_declaration.rb
foobara-0.0.3 projects/type_declarations/src/handlers/extend_associative_array_type_declaration.rb
foobara-0.0.2 projects/type_declarations/src/handlers/extend_associative_array_type_declaration.rb
foobara-0.0.1 projects/type_declarations/src/handlers/extend_associative_array_type_declaration.rb