Class: Avro::Builder::Types::MapType

Inherits:
Type
  • Object
show all
Includes:
ComplexType, TypeReferencer
Defined in:
lib/avro/builder/types/map_type.rb

Constant Summary

Constants included from Avro::Builder::TypeFactory

Avro::Builder::TypeFactory::BUILTIN_TYPES, Avro::Builder::TypeFactory::COMPLEX_TYPES, Avro::Builder::TypeFactory::NAMED_TYPES

Instance Attribute Summary

Attributes inherited from Type

#avro_type_name

Instance Method Summary collapse

Methods included from ComplexType

included, #initialize, #namespace, #to_h

Methods inherited from Type

#abstract?, #cache!, #configure_options, #dsl_method?, #dsl_respond_to?, #initialize, #namespace, #to_h, union_with_null

Methods included from DslAttributes

#dsl_attribute?, included

Methods included from DslOptions

#dsl_option?, included

Instance Method Details

#serialize(referenced_state) ⇒ Object


16
17
18
19
# File 'lib/avro/builder/types/map_type.rb', line 16

def serialize(referenced_state)
  super(referenced_state,
        overrides: { values: values.serialize(referenced_state) })
end

#validate!Object


21
22
23
# File 'lib/avro/builder/types/map_type.rb', line 21

def validate!
  validate_required_attribute!(:values)
end