Sha256: 98afd7619b71c9ad384b1010f2d0eb10270463e4b8c6040e9088acf6cfccaf6b
Contents?: true
Size: 775 Bytes
Versions: 4
Compression:
Stored size: 775 Bytes
Contents
module Avro module Builder module Types # This module provides common functionality for non-primitive types # that do not require a name to be created. module ComplexType def self.included(base) base.extend ClassMethods end # Override initialize so that type name is not required def initialize(cache:, field: nil) super(self.class.avro_type_name, cache: cache, field: field) end def namespace field.namespace end module ClassMethods # Infer avro_type_name based on class def avro_type_name @avro_type_name ||= name.split('::').last.sub('Type', '').downcase.to_sym end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems