Sha256: fcef94279397e84738a360e5d3761dca0ae2bf4eef942c3b6b9314e17ec3718f

Contents?: true

Size: 818 Bytes

Versions: 31

Compression:

Stored size: 818 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, :databases, :indices, :registry, :format, :entity_options
  def initialize(dir, namespace = nil)
    @dir = Path.setup(dir.dup)

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

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

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

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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
rbbt-util-5.18.0 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.89 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.88 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.87 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.86 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.85 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.84 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.83 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.82 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.81 lib/rbbt/knowledge_base.rb
rbbt-util-5.17.80 lib/rbbt/knowledge_base.rb