Class: Agent::Lock::CLI::Commands::List
- Inherits:
-
TreeCommand
- Object
- Dry::CLI::Command
- Base
- TreeCommand
- Agent::Lock::CLI::Commands::List
- Defined in:
- lib/agent/lock/cli/commands/list.rb
Overview
Every lock in this repository. Another repository's locks are not this command's, even when they share a Redis.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from TreeCommand
Methods inherited from Base
Constructor Details
This class inherits a constructor from Agent::Lock::CLI::Commands::Base
Instance Method Details
#call(**options) ⇒ Manager::Result
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/agent/lock/cli/commands/list.rb', line 23 def call(**) manager = manager() result = manager.list records = result.records.select { |record| this_repo?(record, manager.tree) } name_store(manager.store) if [:json] report_records(records, json: true, stale_minutes: manager.stale_minutes) else report_listing(records, manager, notes: [:notes]) end finish(result) end |