Sha256: 05b0dc3c690cbcddea0511f5b9084fac18ca7956aef2cde41c3242f8a376ecef
Contents?: true
Size: 497 Bytes
Versions: 4
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true require "thor" require "json" module RogueOne class CLI < Thor desc "report [DNS_SERVER]", "Show a report of a given DNS server" def report(dns_server) with_error_handling do detector = Detector.new(target: dns_server) puts JSON.pretty_generate(detector.report) end end no_commands do def with_error_handling yield rescue StandardError => e puts "Warning: #{e}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rogue_one-0.1.3 | lib/rogue_one/cli.rb |
rogue_one-0.1.2 | lib/rogue_one/cli.rb |
rogue_one-0.1.1 | lib/rogue_one/cli.rb |
rogue_one-0.1.0 | lib/rogue_one/cli.rb |