class Iglu::Registries::EmbeddedRegistryRef

This is not a replacement for JVM Embedded Registry It is something more like FileSystemRegistry if you pass absolute path, But by default it's root is relative to gem

Public Class Methods

new(config, path) click to toggle source
# File lib/iglu-client/registries.rb, line 73
def initialize(config, path)
  @config = config
  @class_priority = 1
  @descriptor = "embedded"

  @root = path
end

Public Instance Methods

lookup_schema(schema_key) click to toggle source
# File lib/iglu-client/registries.rb, line 81
def lookup_schema(schema_key)
  schema_path = File.join(@root, 'schemas', schema_key.as_path)
  content = File.read(schema_path)
  JSON::parse(content)
rescue Errno::ENOENT => _
  nil
end