Class: WritersRoom::ListMemoryTool
- Inherits:
-
RobotLab::Tool
- Object
- RobotLab::Tool
- WritersRoom::ListMemoryTool
- Defined in:
- lib/writers_room/tools/list_memory_tool.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/writers_room/tools/list_memory_tool.rb', line 8 def execute memory = robot.shared_memory return "No shared memory available." unless memory keys = memory.keys if keys.empty? "Shared memory is empty." else "Keys in shared memory: #{keys.join(', ')}" end end |