class Proxy::OpenSCAP::Storage

Public Class Methods

new(path_to_dir, cname, id, date) click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 9
def initialize(path_to_dir, cname, id, date)
  @namespace = 'arf'
  @cname = cname
  @id = id
  @date = date
  validate_id(@id)
  @path_to_dir = path_to_dir
  @path = "#{@path_to_dir}/#{@namespace}/#{@cname}/#{@id}/#{@date}/"
end

Public Instance Methods

get_arf_html(full_path, digest) click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 35
def get_arf_html(full_path, digest)
  raise NotImplementedError
end
get_arf_xml(full_path, digest) click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 31
def get_arf_xml(full_path, digest)
  raise NotImplementedError
end
store_archive(full_path, data) click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 19
def store_archive(full_path, data)
  raise NotImplementedError
end
store_failed(full_path, data) click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 27
def store_failed(full_path, data)
  raise NotImplementedError
end
store_spool(full_path, data) click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 23
def store_spool(full_path, data)
  raise NotImplementedError
end

Private Instance Methods

validate_id(id) click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 41
def validate_id(id)
  raise Proxy::OpenSCAP::OpenSCAPException, 'Malformed ARF ID' unless /\A\d+\Z/ =~ id
end