Class: Llmemory::Cli::Commands::Base
- Inherits:
-
Object
- Object
- Llmemory::Cli::Commands::Base
show all
- Defined in:
- lib/llmemory/cli/commands/base.rb
Direct Known Subclasses
LongTerm::Categories, LongTerm::Edges, LongTerm::Facts, LongTerm::Graph, LongTerm::Nodes, LongTerm::Resources, Mcp, Search, ShortTerm, Stats, Users
Instance Method Summary
collapse
Instance Method Details
#execute(_argv, _opts) ⇒ Object
22
23
24
|
# File 'lib/llmemory/cli/commands/base.rb', line 22
def execute(_argv, _opts)
raise NotImplementedError, "#{self.class}#execute must be implemented"
end
|
#option_parser(parser) ⇒ Object
18
19
20
|
# File 'lib/llmemory/cli/commands/base.rb', line 18
def option_parser(parser)
end
|
#parse_options(argv) ⇒ Object
12
13
14
15
16
|
# File 'lib/llmemory/cli/commands/base.rb', line 12
def parse_options(argv)
OptionParser.new do |opts|
option_parser(opts)
end.parse!(argv)
end
|
#run(argv) ⇒ Object
7
8
9
10
|
# File 'lib/llmemory/cli/commands/base.rb', line 7
def run(argv)
opts = parse_options(argv)
execute(argv, opts)
end
|