Class: Spoom::Coverage::D3::Timeline::Sigs
- Defined in:
- lib/spoom/coverage/d3/timeline.rb
Instance Method Summary collapse
-
#initialize(id, snapshots) ⇒ Sigs
constructor
: (String id, Array snapshots) -> void.
-
#tooltip ⇒ Object
: -> String.
Methods inherited from Stacked
Methods inherited from Timeline
#commits_for_dates, #months, #ticks
Constructor Details
#initialize(id, snapshots) ⇒ Sigs
: (String id, Array snapshots) -> void
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/spoom/coverage/d3/timeline.rb', line 470 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
: -> String
488 489 490 491 492 493 494 |
# File 'lib/spoom/coverage/d3/timeline.rb', line 488 def tooltip <<~JS function tooltip_#{id}(d) { tooltipTimeline(d, "methods excluding RBIs"); } JS end |