#!/usr/bin/env ruby
require "require_all"
require "pry"

# Obtain the present woking directory
current_dir = Dir.pwd

if current_dir =~ /^(.*?\/misc_rbtools)/
  require_all '../modules'
  require_all '../classes'
end

def list_methods(class_name)
  {"#{class_name}": class_name.methods }
end


# different downloading tools 
nvd_downloader = NvdTools::NvdDownloader.new
scans_io_downloader = ScansIoTools::ScansIoDownloader.new
scans_io_parser = ScansIoTools::ScansIoIndexParser.new(scans_io_downloader.get_json_index.body)

downloading_tools = nvd_downloader, scans_io_downloader, scans_io_parser

download_tool_methods = downloading_tools.map do |tool|
  list_methods(tool)
end

Pry.start