Sha256: 7dacac2fd6c91142872d4e511d9d4dcb98297f47c96ef2e2e5d71c2bfd37d188
Contents?: true
Size: 526 Bytes
Versions: 24
Compression:
Stored size: 526 Bytes
Contents
require 'avro_turf/schema_store' class AvroTurf # A schema store that allows you to add or remove schemas, and to access # them externally. class MutableSchemaStore < SchemaStore attr_accessor :schemas # @param schema_hash [Hash] def add_schema(schema_hash) name = schema_hash['name'] namespace = schema_hash['namespace'] full_name = Avro::Name.make_fullname(name, namespace) return if @schemas.key?(full_name) Avro::Schema.real_parse(schema_hash, @schemas) end end end
Version data entries
24 entries across 24 versions & 1 rubygems