Sha256: ef456bf4c1120cfb9e1d48f707b12696bdf322ce7a1358ab605148dd02f97c00

Contents?: true

Size: 632 Bytes

Versions: 7

Compression:

Stored size: 632 Bytes

Contents

# frozen_string_literal: true

require 'avro/builder/type_factory'

module Avro
  module Builder
    module Types

      # This concern is used by Types that reference other types.
      module TypeReferencer
        include Avro::Builder::TypeFactory

        private

        def create_builtin_or_lookup_type(avro_type_or_name)
          # Find existing Type or build a new instance of a builtin Type using
          # the supplied block
          type_lookup(avro_type_or_name) do |avro_type_name|
            create_builtin_type(avro_type_name, field: field, cache: cache)
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
avro-builder-2.1.0 lib/avro/builder/types/type_referencer.rb
avro-builder-2.0.0 lib/avro/builder/types/type_referencer.rb
avro-builder-1.1.0 lib/avro/builder/types/type_referencer.rb
avro-builder-1.0.1 lib/avro/builder/types/type_referencer.rb
avro-builder-1.0.0 lib/avro/builder/types/type_referencer.rb
avro-builder-0.17.0 lib/avro/builder/types/type_referencer.rb
avro-builder-0.16.2 lib/avro/builder/types/type_referencer.rb