Class: LLM::Spell
- Inherits:
-
Object
- Object
- LLM::Spell
- Defined in:
- lib/llm/spell.rb,
lib/llm/spell/cli.rb,
lib/llm/spell/text.rb,
lib/llm/spell/engine.rb,
lib/llm/spell/version.rb,
lib/llm/spell/document.rb
Defined Under Namespace
Modules: Engine Classes: CLI, Document, Text
Constant Summary collapse
- Error =
The superclass of all LLM::Spell errors
Class.new(RuntimeError)
- VERSION =
"0.1.0"
Instance Method Summary collapse
- #initialize(options) ⇒ LLM::Spell constructor
-
#interactive ⇒ void
Run in interactive mode.
Constructor Details
#initialize(options) ⇒ LLM::Spell
22 23 24 25 |
# File 'lib/llm/spell.rb', line 22 def initialize() @options = @text = Text.new(File.read(@options[:file]), llm) end |
Instance Method Details
#interactive ⇒ void
This method returns an undefined value.
Run in interactive mode
30 31 32 33 34 35 36 37 |
# File 'lib/llm/spell.rb', line 30 def interactive if mime_types.include?(LLM::Mime[file]) File.write file, CLI.new(@text).start else raise Error, "In interactive mode, the following mime types " \ "are supported: #{mime_types.join(', ')}" end end |