Class: Tros::Schema::MapSchema
- Inherits:
-
Tros::Schema
- Object
- Tros::Schema
- Tros::Schema::MapSchema
- 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
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Attributes inherited from Tros::Schema
Instance Method Summary collapse
-
#initialize(values, names = nil, default_namespace = nil) ⇒ MapSchema
constructor
A new instance of MapSchema.
- #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(values, names = nil, default_namespace = nil) ⇒ MapSchema
Returns a new instance of MapSchema.
270 271 272 273 |
# File 'lib/tros/schema.rb', line 270 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.
268 269 270 |
# File 'lib/tros/schema.rb', line 268 def values @values end |
Instance Method Details
#to_avro(names = Set.new) ⇒ Object
275 276 277 |
# File 'lib/tros/schema.rb', line 275 def to_avro(names=Set.new) super.merge('values' => values.to_avro(names)) end |