Sha256: 345298a2653364556aef408509e3754baaca332a2d5e14d7d0c2e93f520f7c0e

Contents?: true

Size: 599 Bytes

Versions: 32

Compression:

Stored size: 599 Bytes

Contents

class KnowledgeBase
  def syndicate(name, kb)
    kb.all_databases.each do |database|
      db_name = [database, name] * "@"
      file, kb_options = kb.registry[database]
      options = {}
      options[:entity_options] = kb_options[:entity_options]
      options[:undirected] = kb_options[:undirected] if kb_options 
      if kb.entity_options
        options[:entity_options] = kb.entity_options.merge(options[:entity_options] || {})
      end

      register(db_name, nil, options) do
        kb.get_database(database)
      end
    end
  end

  def all_databases
    @registry.keys 
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
rbbt-util-5.17.31 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.30 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.29 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.28 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.27 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.26 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.25 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.24 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.23 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.22 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.21 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.20 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.19 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.18 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.17 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.16 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.15 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.14 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.13 lib/rbbt/knowledge_base/syndicate.rb
rbbt-util-5.17.12 lib/rbbt/knowledge_base/syndicate.rb