Class: Tros::Schema::ArraySchema
- Inherits:
-
Tros::Schema
- Object
- Tros::Schema
- Tros::Schema::ArraySchema
- Defined in:
- lib/tros/schema.rb
Constant Summary
Constants inherited from Tros::Schema
INT_MAX_VALUE, INT_MIN_VALUE, LONG_MAX_VALUE, LONG_MIN_VALUE, NAMED_TYPES, NAMED_TYPES_SYM, PRIMITIVE_TYPES, PRIMITIVE_TYPES_SYM, VALID_TYPES, VALID_TYPES_SYM
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Attributes inherited from Tros::Schema
Instance Method Summary collapse
-
#initialize(items, names = nil, default_namespace = nil) ⇒ ArraySchema
constructor
A new instance of ArraySchema.
- #to_avro(names = Set.new) ⇒ Object
Methods inherited from Tros::Schema
#==, #hash, parse, real_parse, #subparse, #to_s, #type, validate, validate_strictly
Constructor Details
#initialize(items, names = nil, default_namespace = nil) ⇒ ArraySchema
Returns a new instance of ArraySchema.
257 258 259 260 |
# File 'lib/tros/schema.rb', line 257 def initialize(items, names=nil, default_namespace=nil) super(:array) @items = subparse(items, names, default_namespace) end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
255 256 257 |
# File 'lib/tros/schema.rb', line 255 def items @items end |
Instance Method Details
#to_avro(names = Set.new) ⇒ Object
262 263 264 |
# File 'lib/tros/schema.rb', line 262 def to_avro(names=Set.new) super.merge('items' => items.to_avro(names)) end |