Sha256: 07510f47e66fbae49d105afc1d38ce03c499587ef921fb8ea329eaeb62e2f934

Contents?: true

Size: 764 Bytes

Versions: 20

Compression:

Stored size: 764 Bytes

Contents

module Foobara
  module TypeDeclarations
    class TypeDeclarationHandlerRegistry < Value::Processor::Selection
      class << self
        def foobara_manifest(to_include:)
          # :nocov:
          super.merge(processor_type: :type_declaration_handler_registry)
          # :nocov:
        end
      end

      def initialize
        super(enforce_unique: false)
      end

      def type_declaration_handler_for_handler_class(type_declaration_handler_class)
        processors.find do |type_declaration_handler|
          type_declaration_handler.instance_of?(type_declaration_handler_class)
        end
      end

      alias type_declaration_handler_for processor_for!
      alias handlers processors
      alias type_for process_value!
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
foobara-0.0.20 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.19 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.18 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.17 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.16 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.15 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.14 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.13 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.12 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.11 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.10 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.9 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.8 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.7 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.6 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.5 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.4 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.3 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.2 projects/type_declarations/src/type_declaration_handler_registry.rb
foobara-0.0.1 projects/type_declarations/src/type_declaration_handler_registry.rb