Class: Spoom::Coverage::D3::Timeline::Sigs
- Inherits:
-
Stacked
- Object
- Base
- Spoom::Coverage::D3::Timeline
- Stacked
- Spoom::Coverage::D3::Timeline::Sigs
- Extended by:
- T::Sig
- Defined in:
- lib/spoom/coverage/d3/timeline.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(id, snapshots) ⇒ Sigs
constructor
A new instance of Sigs.
- #tooltip ⇒ Object
Methods inherited from Stacked
Methods inherited from Spoom::Coverage::D3::Timeline
#area, header_script, header_style, #line, #plot, #points, #script, #x_scale, #x_ticks, #y_scale, #y_ticks
Methods inherited from Base
header_script, header_style, #html, #script
Constructor Details
#initialize(id, snapshots) ⇒ Sigs
Returns a new instance of Sigs.
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/spoom/coverage/d3/timeline.rb', line 479 def initialize(id, snapshots) keys = ["false", "true"] data = snapshots.map do |snapshot| { timestamp: snapshot., commit: snapshot.commit_sha, total: snapshot.methods_with_sig_excluding_rbis + snapshot.methods_without_sig_excluding_rbis, values: { true: snapshot.methods_with_sig_excluding_rbis, false: snapshot.methods_without_sig_excluding_rbis, }, } end super(id, data, keys) end |
Instance Method Details
#tooltip ⇒ Object
496 497 498 499 500 501 502 |
# File 'lib/spoom/coverage/d3/timeline.rb', line 496 def tooltip <<~JS function tooltip_#{id}(d) { tooltipTimeline(d, "methods excluding RBIs"); } JS end |