Class: Bristow::Agencies::Workflow
- Inherits:
-
Bristow::Agency
- Object
- Bristow::Agency
- Bristow::Agencies::Workflow
- Defined in:
- lib/bristow/agencies/workflow.rb
Instance Method Summary collapse
Methods inherited from Bristow::Agency
chat, #find_agent, #initialize
Methods included from Sgetter
Constructor Details
This class inherits a constructor from Bristow::Agency
Instance Method Details
#chat(messages, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/bristow/agencies/workflow.rb', line 4 def chat(, &block) return if agents.empty? agents.each.with_index(1) do |agent, index| last = index == agents.size = agent.chat(, &(last ? block : nil)) end end |