Class: Agent::Lock::CLI::Commands::ShowRepo
- Defined in:
- lib/agent/lock/cli/commands/show.rb
Overview
alock show repo [owner/name].
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Show
Methods inherited from Base
Constructor Details
This class inherits a constructor from Agent::Lock::CLI::Commands::Base
Instance Method Details
#call(repo: nil, **options) ⇒ void
This method returns an undefined value.
153 154 155 156 157 158 |
# File 'lib/agent/lock/cli/commands/show.rb', line 153 def call(repo: nil, **) repo = Store::RedisIndex.slug_for if repo.to_s.strip.empty? locks = index().locks(repo) rows = locks.map { |lock| row(lock.record) } table(rows, header: %w[Scope Holder Held Alive Release], empty: "No locks for #{repo}.", slug: repo) end |