Module: Bookworm::KnowledgeBaseBackends::SimpleHash

Defined in:
lib/bookworm/knowledge_base.rb

Overview

The SimpleHash backend stores the KnowledgeBase information as … a simple hash. No concurrency guarantees, caching, etc. Each bookworm run will run all the rules, every time.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



27
28
29
# File 'lib/bookworm/knowledge_base.rb', line 27

def [](key)
  @kb_internal_hash[key]
end

#[]=(key, value) ⇒ Object



31
32
33
# File 'lib/bookworm/knowledge_base.rb', line 31

def []=(key, value)
  @kb_internal_hash[key] = value
end

#init_hooksObject



23
24
25
# File 'lib/bookworm/knowledge_base.rb', line 23

def init_hooks
  @kb_internal_hash = {}
end