Class: Slidict::Lint::Linter
- Inherits:
-
Object
- Object
- Slidict::Lint::Linter
- Defined in:
- lib/slidict/lint/linter.rb
Overview
Orchestrates a lint run: splits the raw deck source into slides and asks the LLM client to diagnose the presentation's structure.
Defined Under Namespace
Classes: Error
Instance Method Summary collapse
-
#initialize(client:) ⇒ Linter
constructor
A new instance of Linter.
- #lint(content, format: "markdown") ⇒ Object
Constructor Details
#initialize(client:) ⇒ Linter
Returns a new instance of Linter.
10 11 12 |
# File 'lib/slidict/lint/linter.rb', line 10 def initialize(client:) @client = client end |
Instance Method Details
#lint(content, format: "markdown") ⇒ Object
14 15 16 17 18 19 |
# File 'lib/slidict/lint/linter.rb', line 14 def lint(content, format: "markdown") = SlideParser.parse(content, format: format) raise Error, "no slides found in the given file" if .empty? @client.() end |