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.
38 39 40 41 |
# File 'lib/rake/funnel/support/timing/report.rb', line 38 def initialize(stats, opts = {}) @stats = stats @opts = opts end |
Instance Method Details
#columns ⇒ Object
49 50 51 52 53 54 |
# File 'lib/rake/funnel/support/timing/report.rb', line 49 def columns @columns ||= begin [ Column.new(stats: @stats, header: 'Target', accessor: ->(timing) { timing[:task].name }), Column.new(stats: @stats, header: 'Duration', accessor: ->(timing) { format(timing[:time]) }) ] end end |
#render ⇒ Object
43 44 45 46 47 |
# File 'lib/rake/funnel/support/timing/report.rb', line 43 def render header rows end |