Module: LLM::Shell::Command::Extension
- Included in:
- LLM
- Defined in:
- lib/llm/shell/command/extension.rb
Overview
The LLM::Shell::Command::Extension
module extends the LLM
constant with methods that can provide shell
commands for an active llm-shell session.
Instance Method Summary collapse
Instance Method Details
#command(name) {|cmd| ... } ⇒ void
This method returns an undefined value.
28 29 30 31 32 33 |
# File 'lib/llm/shell/command/extension.rb', line 28 def command(name) cmd = LLM::Shell::Command.new cmd.name(name) yield cmd commands[cmd.name] = cmd end |
#commands ⇒ Hash<String, LLM::Shell::Command>
37 38 39 |
# File 'lib/llm/shell/command/extension.rb', line 37 def commands @commands ||= {} end |