Class: Koji::CLI

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

Instance Method Summary collapse

Instance Method Details

#check(url) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/koji/cli.rb', line 10

def check(url)
  website = Website.new(url)
  detector = Detector.new(website)
  verbose = options.dig("verbose") || false
  report = verbose ? detector.detailed_report : detector.report

  puts JSON.pretty_generate(report)
end