Sha256: 40e7ce3c4fd99fa9f5d78ac138393e7694920943ac57b0576f18a3aa93ff52a4

Contents?: true

Size: 520 Bytes

Versions: 28

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

require 'avro_turf/schema_store'

# Allows us to add in-memory schemas to the schema store in
# addition to the ones stored in the file system.
class AvroTurf::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

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
deimos-ruby-1.3.0.pre.beta5 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.4.0.pre.beta7 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.4.0.pre.beta6 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.4.0.pre.beta5 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.3.0.pre.beta4 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.4.0.pre.beta4 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.4.0.pre.beta3 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.3.0.pre.beta3 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.4.0.pre.beta2 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.4.0.pre.beta1 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.3.0.pre.beta2 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.3.0.pre.beta1 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.2.0.pre.beta1 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.1.0.pre.beta2 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.1.0.pre.beta1 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.0.0 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.0.0.pre.beta26 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.0.0.pre.beta25 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.0.0.pre.beta24 lib/deimos/monkey_patches/schema_store.rb
deimos-ruby-1.0.0.pre.beta23 lib/deimos/monkey_patches/schema_store.rb