Class: Agent::Lock::CLI::Commands::Release
- Defined in:
- lib/agent/lock/cli/commands/release.rb
Overview
Give a scope back.
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:, **options) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/agent/lock/cli/commands/release.rb', line 17 def call(scope:, **) result = manager([:dir]).release(scope) case result.status when :released then say("RELEASED #{result.record.scope}") when :not_found then say("NOT LOCKED #{scope}") when :refused warn_("REFUSED: #{result.record.scope} is held by #{result.record.agent_id}, not you") end finish(result) end |