Class: Llmemory::Cli::Commands::Users
- Defined in:
- lib/llmemory/cli/commands/users.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#execute(_argv, _opts) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/llmemory/cli/commands/users.rb', line 15 def execute(_argv, _opts) store = short_term_store(@store_type) users = store.list_users if users.empty? puts "No users with short-term memory found." else users.each { |u| puts u } end end |
#option_parser(parser) ⇒ Object
9 10 11 12 13 |
# File 'lib/llmemory/cli/commands/users.rb', line 9 def option_parser(parser) parser.on("--store TYPE", "Short-term store: memory, redis, postgres, active_record") do |v| @store_type = v end end |