Class: Avro::Schema::MapSchema
- Inherits:
-
Schema
- Object
- Schema
- Avro::Schema::MapSchema
- Defined in:
- lib/avro/schema.rb
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(values, names = nil, default_namespace = nil) ⇒ MapSchema
constructor
A new instance of MapSchema.
- #to_avro(names = Set.new) ⇒ Object
Constructor Details
#initialize(values, names = nil, default_namespace = nil) ⇒ MapSchema
Returns a new instance of MapSchema.
388 389 390 391 |
# File 'lib/avro/schema.rb', line 388 def initialize(values, names=nil, default_namespace=nil) super(:map) @values = subparse(values, names, default_namespace) end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
386 387 388 |
# File 'lib/avro/schema.rb', line 386 def values @values end |
Instance Method Details
#to_avro(names = Set.new) ⇒ Object
393 394 395 |
# File 'lib/avro/schema.rb', line 393 def to_avro(names=Set.new) super.merge('values' => values.to_avro(names)) end |