Class: Audiothority::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/audiothority/cli.rb

Instance Method Summary collapse

Instance Method Details

#enforce(*paths) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/audiothority/cli.rb', line 32

def enforce(*paths)
  if paths.any?
    run_scan_for(paths)
    display_summary
    if tracker.suspects.any? && should_enforce?
      execute_enforcement
    end
  else
    self.class.task_help(console, 'enforce')
  end
end

#scan(*paths) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/audiothority/cli.rb', line 17

def scan(*paths)
  if paths.any?
    run_scan_for(paths)
    display_summary
    throw_in_custody
  else
    self.class.task_help(console, 'scan')
  end
end