Sha256: 707f91ac54a9ba7492c262d6e295173dab0793323de9ad0a1a113d7161eac1e6

Contents?: true

Size: 647 Bytes

Versions: 8

Compression:

Stored size: 647 Bytes

Contents

module Avro
  module Builder
    module Types
      class ArrayType < Type
        include Avro::Builder::Types::ComplexType
        include Avro::Builder::Types::TypeReferencer

        dsl_attribute :items do |items_type = nil|
          if items_type
            @items = create_builtin_or_lookup_type(items_type)
          else
            @items
          end
        end

        def validate!
          validate_required_attribute!(:items)
        end

        def serialize(referenced_state)
          super(referenced_state,
                overrides: { items: items.serialize(referenced_state) })
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
avro-builder-0.16.1 lib/avro/builder/types/array_type.rb
avro-builder-0.16.0 lib/avro/builder/types/array_type.rb
avro-builder-0.15.0 lib/avro/builder/types/array_type.rb
avro-builder-0.15.0.rc0 lib/avro/builder/types/array_type.rb
avro-builder-0.14.1 lib/avro/builder/types/array_type.rb
avro-builder-0.14.0 lib/avro/builder/types/array_type.rb
avro-builder-0.13.0 lib/avro/builder/types/array_type.rb
avro-builder-0.12.0 lib/avro/builder/types/array_type.rb