Class: Avro::Builder::Types::PrimitiveType

Inherits:
Type
  • Object
show all
Defined in:
lib/avro/builder/types/primitive_type.rb

Overview

Subclass of Type for primitive Avro types (null, boolean, int, long, float, double, bytes, string).

Direct Known Subclasses

BytesType

Constant Summary

Constants included from DslAttributes

DslAttributes::ATTRIBUTE_NAMES

Instance Attribute Summary

Attributes inherited from Type

#avro_type_name

Instance Method Summary collapse

Methods inherited from Type

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

Methods included from Metadata

attribute?, #method_missing, register, reset!, #respond_to_missing?

Methods included from DslAttributes

#dsl_attribute?, included

Methods included from DslOptions

#dsl_option?, included

Constructor Details

This class inherits a constructor from Avro::Builder::Types::Type

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Avro::Builder::Metadata

Instance Method Details

#serialize(reference_state) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/avro/builder/types/primitive_type.rb', line 9

def serialize(reference_state)
  if logical_type
    super
  else
    avro_type_name
  end
end