Class: Avro::Schema::MapSchema

Inherits:
Avro::Schema show all
Defined in:
lib/avro/schema.rb

Constant Summary

Constants inherited from Avro::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

Attributes inherited from Avro::Schema

#type_sym

Instance Method Summary collapse

Methods inherited from Avro::Schema

#==, #hash, parse, real_parse, #subparse, #to_s, #type, validate

Constructor Details

#initialize(values, names = nil, default_namespace = nil) ⇒ MapSchema

Returns a new instance of MapSchema.



261
262
263
264
# File 'lib/avro/schema.rb', line 261

def initialize(values, names=nil, default_namespace=nil)
  super(:map)
  @values = subparse(values, names, default_namespace)
end

Instance Attribute Details

#valuesObject (readonly)

Returns the value of attribute values.



259
260
261
# File 'lib/avro/schema.rb', line 259

def values
  @values
end

Instance Method Details

#to_avro(names = Set.new) ⇒ Object



266
267
268
# File 'lib/avro/schema.rb', line 266

def to_avro(names=Set.new)
  super.merge('values' => values.to_avro(names))
end