added filenames_json instance var and JSON constant?
This commit is contained in:
parent
5e67a6629a
commit
edb87d3148
1 changed files with 3 additions and 1 deletions
|
@ -3,17 +3,19 @@ require 'zlib'
|
|||
require 'json'
|
||||
|
||||
class NvdDownloader
|
||||
attr_accessor :version, :base_url, :base_filename, :years
|
||||
attr_accessor :version, :base_url, :base_filename, :years, :filenames_json
|
||||
|
||||
MIN_YEAR = '2002'
|
||||
MAX_YEAR = '2019'
|
||||
AVAILABLE_YEARS = (MIN_YEAR..MAX_YEAR).to_a
|
||||
JSON = 'json.gz'
|
||||
|
||||
def initialize
|
||||
@version = "1.0"
|
||||
@base_url = "https://nvd.nist.gov/feeds/json/cve/#{version}/"
|
||||
@base_filename = "nvdcve-#{version}-"
|
||||
@years = self.years
|
||||
@filenames_json = self.filenames(JSON)
|
||||
end
|
||||
|
||||
def years
|
||||
|
|
Loading…
Add table
Reference in a new issue