Sha256: 64e7254d98e7a3dad20d6655418f4bacc438d61b7e8de0d46cfb91e9f5431d9f
Contents?: true
Size: 469 Bytes
Versions: 4
Compression:
Stored size: 469 Bytes
Contents
# frozen_string_literal: true require 'json' require 'openssl' module NoradBeacon class ResultSet < HttpPayload def initialize(url = nil) super(url) @results = [] end def add(result) @results.push(result) end def payload @payload ||= { results: @results, timestamp: Time.now.to_i }.to_json end private def url_from_env JSON.parse(ENV.fetch('ASSESSMENT_PATHS')).first['assessment'] end end end
Version data entries
4 entries across 4 versions & 1 rubygems