Sha256: 9659540477945fc1a2f3067cd404481f00f466b50944327880476fe70576a2b3

Contents?: true

Size: 806 Bytes

Versions: 5

Compression:

Stored size: 806 Bytes

Contents

require 'rbbt/association'
require 'rbbt/association/item'
require 'rbbt/knowledge_base/entity'
require 'rbbt/knowledge_base/query'
require 'rbbt/knowledge_base/syndicate'

class KnowledgeBase

  attr_accessor :namespace, :dir, :indices, :registry, :format, :databases, :entity_options
  def initialize(dir, namespace = nil)
    @dir = Path.setup(dir.dup).find

    @namespace = namespace
    @format = IndiferentHash.setup({})

    @registry ||= IndiferentHash.setup({})
    @entity_options = IndiferentHash.setup({})

    @indices = IndiferentHash.setup({})
    @databases = IndiferentHash.setup({})
    @identifiers = IndiferentHash.setup({})
    @descriptions = {}
    @databases = {}
  end

  def setup(name, matches, reverse = false)
    AssociationItem.setup matches, self, name, reverse
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rbbt-util-5.14.38 lib/rbbt/knowledge_base.rb
rbbt-util-5.14.37 lib/rbbt/knowledge_base.rb
rbbt-util-5.14.36 lib/rbbt/knowledge_base.rb
rbbt-util-5.14.35 lib/rbbt/knowledge_base.rb
rbbt-util-5.14.34 lib/rbbt/knowledge_base.rb