Class: Ruptr::Report::Builder

Inherits:
Object
  • Object
show all
Includes:
Sink
Defined in:
lib/ruptr/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Sink

#begin_case, #begin_group, #finish_case, #finish_group, #submit_case, #submit_group, #submit_plan

Constructor Details

#initialize(report = Report.new) ⇒ Builder

Returns a new instance of Builder.



89
90
91
# File 'lib/ruptr/report.rb', line 89

def initialize(report = Report.new)
  @report = report
end

Instance Attribute Details

#reportObject

Returns the value of attribute report.



93
94
95
# File 'lib/ruptr/report.rb', line 93

def report
  @report
end

Instance Method Details

#begin_plan(fields) ⇒ Object



95
96
97
# File 'lib/ruptr/report.rb', line 95

def begin_plan(fields)
  fields.each { |k, v| report[k] = v }
end

#finish_element(te, tr) ⇒ Object



103
104
105
# File 'lib/ruptr/report.rb', line 103

def finish_element(te, tr)
  report.record_result(te, tr)
end

#finish_plan(fields) ⇒ Object



99
100
101
# File 'lib/ruptr/report.rb', line 99

def finish_plan(fields)
  fields.each { |k, v| report[k] = v }
end