Class: Agent::Lock::CLI::Commands::Check
- Inherits:
-
TreeCommand
- Object
- Dry::CLI::Command
- Base
- TreeCommand
- Agent::Lock::CLI::Commands::Check
- Defined in:
- lib/agent/lock/cli/commands/check.rb
Overview
Ask before writing. Exits 1 when anything overlapping is held, so a shell script can gate on it without parsing anything.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(scope:, **options) ⇒ Manager::Result
:free, :mine or :held.
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(scope:, **options) ⇒ Manager::Result
Returns :free, :mine or :held.
23 24 25 26 27 28 |
# File 'lib/agent/lock/cli/commands/check.rb', line 23 def call(scope:, **) manager = manager() result = manager.check(scope) report(result, scope, json: [:json], stale_minutes: manager.stale_minutes) finish(result) end |