Class: Agent::Lock::CLI::Commands::Check

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

#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(scope:, **options) ⇒ Manager::Result

Parameters:

  • scope (String)
  • options (Hash)

Returns:



23
24
25
26
27
28
# File 'lib/agent/lock/cli/commands/check.rb', line 23

def call(scope:, **options)
  manager = manager(options[:dir])
  result = manager.check(scope)
  report(result, scope, json: options[:json], stale_minutes: manager.stale_minutes)
  finish(result)
end