Class: Agent::Lock::CLI::Commands::ReleaseAll
- Inherits:
-
TreeCommand
- Object
- Dry::CLI::Command
- Base
- TreeCommand
- Agent::Lock::CLI::Commands::ReleaseAll
- Defined in:
- lib/agent/lock/cli/commands/release_all.rb
Overview
What a session should run when it finishes, so the next one does not have to work out whether it crashed.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(**options) ⇒ Manager::Result
With every record it released.
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
Returns with every record it released.
16 17 18 19 20 21 |
# File 'lib/agent/lock/cli/commands/release_all.rb', line 16 def call(**) result = manager().release_all result.records.each { |record| say("RELEASED #{scope_of(record)}") } say("Released #{result.records.size} lock(s).") finish(result) end |