Sha256: 7e7848c3381b501f1d3b2fcea834795f3209b9ba7e301fc52f9a7cd8a62c6092
Contents?: true
Size: 497 Bytes
Versions: 6
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true # backtick_javascript: true class File def self.write(path, data) # This is only to enable CDP runners to write the benchmark results %x{ var http = new XMLHttpRequest(); http.open("POST", "/File.write"); http.setRequestHeader("Content-Type", "application/json"); // Failure is not an option http.send(JSON.stringify({filename: #{path}, data: #{data}, secret: window.OPAL_CDP_SHARED_SECRET})); } data.length end end
Version data entries
6 entries across 6 versions & 1 rubygems