Class: Avro::Builder::Types::EnumType

Inherits:
NamedType show all
Defined in:
lib/avro/builder/types/enum_type.rb

Direct Known Subclasses

Enum

Instance Attribute Summary

Attributes inherited from Type

#avro_type_name

Instance Method Summary collapse

Methods inherited from NamedType

#cache!, #name, #name_fragment, #namespace

Methods included from NamedErrorHandling

#type_name, #type_namespace

Methods included from Aliasable

included

Methods included from Namespaceable

#fullname

Methods included from ComplexType

included, #initialize, #namespace

Methods inherited from Type

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

Methods included from DslAttributes

#dsl_attribute?, included

Methods included from DslOptions

#dsl_option?, included

Instance Method Details

#serialize(reference_state) ⇒ Object



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

def serialize(reference_state)
  super(reference_state, overrides: serialized_attributes)
end

#to_h(reference_state) ⇒ Object



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

def to_h(reference_state)
  super(reference_state, overrides: serialized_attributes)
end

#validate!Object



25
26
27
28
# File 'lib/avro/builder/types/enum_type.rb', line 25

def validate!
  super
  validate_required_attribute!(:symbols)
end