lib/avro/builder/dsl.rb in avro-builder-0.6.0 vs lib/avro/builder/dsl.rb in avro-builder-0.7.0

- old
+ new

@@ -5,10 +5,13 @@ require 'avro/builder/namespaceable' require 'avro/builder/definition_cache' require 'avro/builder/type_factory' require 'avro/builder/types' require 'avro/builder/field' +require 'avro/builder/record' +require 'avro/builder/enum' +require 'avro/builder/fixed' require 'avro/builder/file_handler' require 'avro/builder/schema_serializer_reference_state' module Avro module Builder @@ -77,13 +80,14 @@ def cache @cache ||= Avro::Builder::DefinitionCache.new(self) end - def create_named_type(name, type_name, options = {}, &block) - create_and_configure_builtin_type(type_name, + def create_named_type(name, avro_type_name, options = {}, &block) + create_and_configure_builtin_type(avro_type_name, cache: cache, - internal: { name: name, namespace: namespace }, + internal: { _name: name, + namespace: namespace }, options: options, &block).tap do |type| type.validate! @last_object = type end