class DCCSCR::Whitelist::Entry

Internal class to hold a single greylist.

Attributes

parent[R]
value[R]

Public Class Methods

new(whitelist:, subpath:, greylist: " click to toggle source
# File lib/dccscr/whitelist.rb, line 44
def initialize(whitelist:, subpath:, greylist: "#{File.basename(subpath)}.greylist")
  warn "Parse: #{File.join subpath,  greylist}"

  @value = JSON.parse(File.read(File.join(whitelist.path, subpath, greylist)))

  whitelist[@parent] unless (@parent = @value['image_parent_name'] || '').empty?
end