Sha256: e397f48da9808d01f92a69d84de5e17b881d53212a03d88346ddbd968c8ee8d8

Contents?: true

Size: 1.18 KB

Versions: 26

Compression:

Stored size: 1.18 KB

Contents

module Foobara
  module TypeDeclarations
    module WithRegistries
      include Concern

      module ClassMethods
        def type_for_declaration(...)
          Domain.current.foobara_type_from_declaration(...)
        end

        def type_declaration_handler_for(...)
          Domain.current.foobara_type_builder.type_declaration_handler_for(...)
        end

        def lookup_absolute_type!(*, **opts, &)
          Foobara::Namespace.global.foobara_lookup_type!(*, **opts.merge(mode: Namespace::LookupMode::ABSOLUTE), &)
        end

        def lookup_type!(...)
          Foobara::Namespace.current.foobara_lookup_type!(...)
        end

        def type_registered?(...)
          Foobara::Namespace.current.foobara_type_registered?(...)
        end

        def handler_for_class(...)
          Domain.current.foobara_type_builder.handler_for_class(...)
        end
      end

      foobara_delegate :type_for_declaration,
                       :type_declaration_handler_for,
                       :lookup_type!,
                       :lookup_absolute_type!,
                       :type_registered?,
                       :handler_for_class,
                       to: :class
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
foobara-0.0.26 projects/type_declarations/src/with_registries.rb
foobara-0.0.25 projects/type_declarations/src/with_registries.rb
foobara-0.0.24 projects/type_declarations/src/with_registries.rb
foobara-0.0.23 projects/type_declarations/src/with_registries.rb
foobara-0.0.22 projects/type_declarations/src/with_registries.rb
foobara-0.0.21 projects/type_declarations/src/with_registries.rb
foobara-0.0.20 projects/type_declarations/src/with_registries.rb
foobara-0.0.19 projects/type_declarations/src/with_registries.rb
foobara-0.0.18 projects/type_declarations/src/with_registries.rb
foobara-0.0.17 projects/type_declarations/src/with_registries.rb
foobara-0.0.16 projects/type_declarations/src/with_registries.rb
foobara-0.0.15 projects/type_declarations/src/with_registries.rb
foobara-0.0.14 projects/type_declarations/src/with_registries.rb
foobara-0.0.13 projects/type_declarations/src/with_registries.rb
foobara-0.0.12 projects/type_declarations/src/with_registries.rb
foobara-0.0.11 projects/type_declarations/src/with_registries.rb
foobara-0.0.10 projects/type_declarations/src/with_registries.rb
foobara-0.0.9 projects/type_declarations/src/with_registries.rb
foobara-0.0.8 projects/type_declarations/src/with_registries.rb
foobara-0.0.7 projects/type_declarations/src/with_registries.rb