# 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