Class: WBench::RowFormatter
- Inherits:
-
Object
- Object
- WBench::RowFormatter
- Defined in:
- lib/wbench/row_formatter.rb
Instance Method Summary collapse
-
#initialize(name, data) ⇒ RowFormatter
constructor
A new instance of RowFormatter.
- #to_s ⇒ Object
Constructor Details
#initialize(name, data) ⇒ RowFormatter
Returns a new instance of RowFormatter.
3 4 5 6 |
# File 'lib/wbench/row_formatter.rb', line 3 def initialize(name, data) @name = name @stats = Stats.new(data) end |
Instance Method Details
#to_s ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/wbench/row_formatter.rb', line 8 def to_s if @stats.compact.size == 0 name_s + no_result_s else name_s + fastest_s + median_s + slowest_s + std_dev_s end end |