Class: Util::ReportText
Overview
The simplest possible Reporter’s subclass. Suitable for commandline utilities.
Instance Attribute Summary
Attributes inherited from Report
Instance Method Summary (collapse)
-
- (Object) output
Return the text consisting of “label: value” formatted rows.
Methods inherited from Report
#<<, #[], #initialize, #labels, #next
Constructor Details
This class inherits a constructor from Util::Report
Instance Method Details
- (Object) output
Return the text consisting of “label: value” formatted rows.
73 74 75 76 77 78 79 80 81 |
# File '../lib/report.rb', line 73 def output out = @line labels.each do |label| value = self[label].last next if value.nil? out += "#{label}: #{value}\n" end out end |