Class: Agent::Lock::CLI::Commands::Acquire
- Defined in:
- lib/agent/lock/cli/commands/acquire.rb
Overview
Claim a scope, or find out who has it.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Agent::Lock::CLI::Commands::Base
Instance Method Details
#call(scope:, intent: nil, **options) ⇒ Manager::Result
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/agent/lock/cli/commands/acquire.rb', line 31 def call(scope:, intent: nil, **) manager = manager([:dir]) result = manager.acquire( scope, intent: intent || "unspecified", enforce: [:enforce], force: [:force] ) report(result, manager.stale_minutes) finish(result) end |