Sha256: 9d288ee7a7bf48a431c38e10f0d1fd6eedcd40ecf4e647d89e862c2b528a6909
Contents?: true
Size: 672 Bytes
Versions: 4
Compression:
Stored size: 672 Bytes
Contents
module Avro module Builder module Types # This module provides common functionality for Types with a specific # type name vs the generic Type class. module SpecificType def self.included(base) base.extend ClassMethods end # Override initialize so that type name is not required def initialize end def type_name self.class.type_name end module ClassMethods # Infer type_name based on class def type_name @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