Class: Rake::Funnel::Support::Timing::Report
- Inherits:
-
Object
- Object
- Rake::Funnel::Support::Timing::Report
- Defined in:
- lib/rake/funnel/support/timing/report.rb
Defined Under Namespace
Classes: Column
Constant Summary collapse
- SPACE =
3- HEADER_WIDTH =
70
Instance Method Summary collapse
- #columns ⇒ Object
-
#initialize(stats, opts = {}) ⇒ Report
constructor
A new instance of Report.
- #render ⇒ Object
Constructor Details
#initialize(stats, opts = {}) ⇒ Report
Returns a new instance of Report.
36 37 38 39 |
# File 'lib/rake/funnel/support/timing/report.rb', line 36 def initialize(stats, opts = {}) @stats = stats @opts = opts end |
Instance Method Details
#columns ⇒ Object
47 48 49 50 51 52 |
# File 'lib/rake/funnel/support/timing/report.rb', line 47 def columns @columns ||= ([ Column.new(stats: @stats, header: 'Target', accessor: -> (timing) { timing[:task].name }), Column.new(stats: @stats, header: 'Duration', accessor: -> (timing) { format(timing[:time]) }) ]) end |
#render ⇒ Object
41 42 43 44 45 |
# File 'lib/rake/funnel/support/timing/report.rb', line 41 def render header rows end |