Class: Avro::Builder::Types::FixedType

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

Direct Known Subclasses

Fixed

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


8
9
10
# File 'lib/avro/builder/types/fixed_type.rb', line 8

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

#to_h(reference_state) ⇒ Object


12
13
14
# File 'lib/avro/builder/types/fixed_type.rb', line 12

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

#validate!Object


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

def validate!
  super
  validate_required_attribute!(:size)
end