Class: Protest::Reports::Stories::PDF

Inherits:
Protest::Report show all
Includes:
Utils::ColorfulOutput, Utils::Summaries
Defined in:
lib/protest/reports/stories/pdf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils::ColorfulOutput

colors, #print, #puts

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

#streamObject (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