Class: Phronomy::Agent::SharedState::KnowledgeStore
- Inherits:
-
Object
- Object
- Phronomy::Agent::SharedState::KnowledgeStore
- Defined in:
- lib/phronomy/agent/shared_state.rb
Instance Method Summary collapse
-
#initialize ⇒ KnowledgeStore
constructor
A new instance of KnowledgeStore.
- #read_all ⇒ Object
- #size ⇒ Object
- #write(agent:, content:, cycle:) ⇒ Object
Constructor Details
#initialize ⇒ KnowledgeStore
Returns a new instance of KnowledgeStore.
8 9 10 |
# File 'lib/phronomy/agent/shared_state.rb', line 8 def initialize @findings = [] end |
Instance Method Details
#read_all ⇒ Object
13 14 15 |
# File 'lib/phronomy/agent/shared_state.rb', line 13 def read_all @findings.dup end |
#size ⇒ Object
24 25 26 |
# File 'lib/phronomy/agent/shared_state.rb', line 24 def size @findings.size end |
#write(agent:, content:, cycle:) ⇒ Object
18 19 20 21 |
# File 'lib/phronomy/agent/shared_state.rb', line 18 def write(agent:, content:, cycle:) @findings << {agent: agent, content: content, cycle: cycle} nil end |