Class: Jscov::Bless
- Inherits:
-
Object
- Object
- Jscov::Bless
- Defined in:
- lib/jscov/bless.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(response) ⇒ Bless
constructor
A new instance of Bless.
- #result ⇒ Object
Constructor Details
#initialize(response) ⇒ Bless
Returns a new instance of Bless.
3 4 5 |
# File 'lib/jscov/bless.rb', line 3 def initialize(response) @response = response end |
Class Method Details
.js_code ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/jscov/bless.rb', line 56 def js_code <<~JS window.addEventListener("unload", __jscov_dumpCoverage) function __jscov_dumpCoverage() { const cov = window.__coverage__ if (!cov) { return } console.log('__jscov', JSON.stringify(cov)) } JS end |
Instance Method Details
#result ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/jscov/bless.rb', line 7 def result [ @response[0], headers, blessed_body, ] end |