lib/fathom/knowledge_base.rb in fathom-0.3.0 vs lib/fathom/knowledge_base.rb in fathom-0.3.1

- old
+ new

@@ -1,32 +1,43 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'fathom')) -class Fathom::KnowledgeBase +require File.expand_path("../../fathom", __FILE__) + +require 'rdf' +require 'knowledge_base/search' + +module Fathom + class KnowledgeBase - attr_reader :data_store + # ===================== + # = Module Extensions = + # ===================== + include Search - def initialize(opts={}) - opts = OptionsHash.new(opts) - @data_store = OpenStruct.new - end + # attr_reader :data_store - def []=(key, value) - @data_store.table[key] = value - end - - def [](key) - @data_store.table[key] - end - - # This is temporary, but useful for now. After we have the persisted KnowledgeBase, - # we'll create explicit accessor methods or a find syntax. - def method_missing(sym, *args, &block) - if @data_store.table.keys.include?(sym) - @data_store.send(sym) - else - super + def initialize(opts={}) + # opts = OptionsHash.new(opts) + # @data_store = OpenStruct.new end - end + # def []=(key, value) + # @data_store.table[key] = value + # end + # + # def [](key) + # @data_store.table[key] + # end + # + # # This is temporary, but useful for now. After we have the persisted KnowledgeBase, + # # we'll create explicit accessor methods or a find syntax. + # def method_missing(sym, *args, &block) + # if @data_store.table.keys.include?(sym) + # @data_store.send(sym) + # else + # super + # end + # end + + end end if __FILE__ == $0 include Fathom # TODO: Is there anything you want to do to run this file on its own?