Class: Agent::Lock::CLI::Commands::ReleaseAll

Inherits:
Base
  • Object
show all
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

#launcher

Instance Method Summary collapse

Methods inherited from Base

inherited, #initialize

Constructor Details

This class inherits a constructor from Agent::Lock::CLI::Commands::Base

Instance Method Details

#call(**options) ⇒ Object



14
15
16
17
18
19
# File 'lib/agent/lock/cli/commands/release_all.rb', line 14

def call(**options)
  result = manager(options[:dir]).release_all
  result.records.each { |record| say("RELEASED #{record.scope}") }
  say("Released #{result.records.size} lock(s).")
  finish(result)
end