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 7 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
delete_arf_file()
click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 37 def delete_arf_file raise NotImplementedError end
get_arf_html(full_path, digest)
click to toggle source
# File lib/smart_proxy_openscap/storage.rb, line 33 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 29 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 17 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 25 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 21 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 43 def validate_id(id) raise Proxy::OpenSCAP::OpenSCAPException, 'Malformed ARF ID' if (id.is_a?(String) && !id.match(/\A\d+\Z/)) end