Class: IronDome::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/iron_dome.rb

Overview

class entry, this is the main class of the gem.

Instance Method Summary collapse

Instance Method Details

#display_ascii_artObject

rubocop:enable Metrics/MethodLength



38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/iron_dome.rb', line 38

def display_ascii_art
  <<-ART

  ██╗██████╗  ██████╗ ███╗   ██╗██████╗  ██████╗ ███╗   ███╗███████╗
  ██║██╔══██╗██╔═══██╗████╗  ██║██╔══██╗██╔═══██╗████╗ ████║██╔════╝
  ██║██████╔╝██║   ██║██╔██╗ ██║██║  ██║██║   ██║██╔████╔██║█████╗
  ██║██╔══██╗██║   ██║██║╚██╗██║██║  ██║██║   ██║██║╚██╔╝██║██╔══╝
  ██║██║  ██║╚██████╔╝██║ ╚████║██████╔╝╚██████╔╝██║ ╚═╝ ██║███████╗
  ╚═╝╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝╚═════╝  ╚═════╝ ╚═╝     ╚═╝╚══════╝ v#{IronDome::VERSION}

  ART
end

#mainObject

rubocop:disable Metrics/MethodLength



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/iron_dome.rb', line 20

def main
  puts display_ascii_art

  options = {}
  OptionParser.new do |opts|
    opts.on("-o", "--output", "Generate a sarif format file report.") do |output|
      options[:sarif_output] = output
    end

    opts.on("-d", "--detail", "Show vulnerability details.") do |detail|
      options[:detail] = detail
    end
  end.parse!

  Reader.new(options).call
end