Class: Icss::ArrayType

Inherits:
EnumerableType show all
Defined in:
lib/icss/type.rb

Overview

ArrayType describes an Avro Array type.

Arrays use the type name “array” and support a single attribute:

  • items: the schema of the array’s items.

@example, an array of strings is declared with:

{"type": "array", "items": "string"}

Constant Summary

Constants inherited from Type

Type::PRIMITIVE_TYPES

Instance Method Summary collapse

Methods inherited from Type

find, pig_name, primitive?, #primitive?, #to_json

Instance Method Details

#titleObject



412
413
414
# File 'lib/icss/type.rb', line 412

def title
  "array of #{items.title}"
end

#to_hashObject



416
417
418
# File 'lib/icss/type.rb', line 416

def to_hash
  super.merge( :items => (items && items.name) )
end