Class: Ollama::Handlers::Collector
- Inherits:
-
Object
- Object
- Ollama::Handlers::Collector
- Includes:
- Concern
- Defined in:
- lib/ollama/handlers/collector.rb
Instance Attribute Summary
Attributes included from Concern
Instance Method Summary collapse
- #call(response) ⇒ Object
-
#initialize(output: $stdout) ⇒ Collector
constructor
A new instance of Collector.
- #result ⇒ Object
Methods included from Concern
Constructor Details
#initialize(output: $stdout) ⇒ Collector
Returns a new instance of Collector.
4 5 6 7 |
# File 'lib/ollama/handlers/collector.rb', line 4 def initialize(output: $stdout) super @array = [] end |
Instance Method Details
#call(response) ⇒ Object
9 10 11 12 |
# File 'lib/ollama/handlers/collector.rb', line 9 def call(response) @array << response self end |
#result ⇒ Object
14 15 16 |
# File 'lib/ollama/handlers/collector.rb', line 14 def result @array end |