Class: Protest::Reports::Stories::PDF
- Inherits:
-
Protest::Report
- Object
- Protest::Report
- Protest::Reports::Stories::PDF
- Includes:
- Utils::ColorfulOutput, Utils::Summaries
- Defined in:
- lib/protest/reports/stories/pdf.rb
Instance Attribute Summary collapse
-
#stream ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
-
#initialize(stream = STDOUT) ⇒ PDF
constructor
Set the stream where the report will be written to.
- #render_header(pdf) ⇒ Object
- #render_many(pdf, elements) ⇒ Object
Methods included from Utils::ColorfulOutput
Methods included from Utils::Summaries
#summarize_errors, #summarize_pending_tests, #summarize_test_totals
Methods inherited from Protest::Report
#add_assertion, #assertions, #errors, #failures, #failures_and_errors, on, #passes, #pendings, #tests, #time_elapsed, #total_tests
Constructor Details
#initialize(stream = STDOUT) ⇒ PDF
Set the stream where the report will be written to. STDOUT by default.
17 18 19 |
# File 'lib/protest/reports/stories/pdf.rb', line 17 def initialize(stream=STDOUT) @stream = stream end |
Instance Attribute Details
#stream ⇒ Object (readonly)
:nodoc:
14 15 16 |
# File 'lib/protest/reports/stories/pdf.rb', line 14 def stream @stream end |
Instance Method Details
#render_header(pdf) ⇒ Object
21 22 |
# File 'lib/protest/reports/stories/pdf.rb', line 21 def render_header(pdf) end |
#render_many(pdf, elements) ⇒ Object
24 25 26 27 28 |
# File 'lib/protest/reports/stories/pdf.rb', line 24 def render_many(pdf, elements) elements.each do |el| pdf.text el.to_s end end |