class Avro::Builder::Types::BytesType

Subclass for the primitive Bytes type because it supports the decimal logical type.

Public Class Methods

new(cache:, field: nil) click to toggle source
Calls superclass method
# File lib/avro/builder/types/bytes_type.rb, line 10
def initialize(cache:, field: nil)
  super('bytes', field: field, cache: cache)
end

Public Instance Methods

serialize(reference_state) click to toggle source
Calls superclass method
# File lib/avro/builder/types/bytes_type.rb, line 14
def serialize(reference_state)
  super(reference_state, overrides: serialized_attributes)
end
to_h(reference_state) click to toggle source
Calls superclass method
# File lib/avro/builder/types/bytes_type.rb, line 18
def to_h(reference_state)
  super(reference_state, overrides: serialized_attributes)
end

Private Instance Methods

serialized_attributes() click to toggle source
# File lib/avro/builder/types/bytes_type.rb, line 24
def serialized_attributes
  { precision: precision, scale: scale }
end