Class: Gliner::Runners::StructuredRunner
- Inherits:
-
Object
- Object
- Gliner::Runners::StructuredRunner
- Includes:
- Inspectable
- Defined in:
- lib/gliner/runners/structured_runner.rb
Instance Method Summary collapse
- #[](text, **options) ⇒ Object (also: #call)
-
#initialize(model, config) ⇒ StructuredRunner
constructor
A new instance of StructuredRunner.
Methods included from Inspectable
Constructor Details
#initialize(model, config) ⇒ StructuredRunner
Returns a new instance of StructuredRunner.
8 9 10 |
# File 'lib/gliner/runners/structured_runner.rb', line 8 def initialize(model, config) @tasks = build_tasks(model, config) end |
Instance Method Details
#[](text, **options) ⇒ Object Also known as: call
12 13 14 15 16 |
# File 'lib/gliner/runners/structured_runner.rb', line 12 def [](text, **) @tasks.transform_values do |task| task.call(text, **) end end |