class Spoom::Coverage::D3::Timeline::Sigs

Public Class Methods

new(id, snapshots) click to toggle source
Calls superclass method Spoom::Coverage::D3::Timeline::new
# File lib/spoom/coverage/d3/timeline.rb, line 475
def initialize(id, snapshots)
  keys = ['false', 'true']
  data = snapshots.map do |snapshot|
    {
      timestamp: snapshot.commit_timestamp,
      commit: snapshot.commit_sha,
      total: snapshot.methods_with_sig + snapshot.methods_without_sig,
      values: { true: snapshot.methods_with_sig, false: snapshot.methods_without_sig },
    }
  end
  super(id, data, keys)
end

Public Instance Methods

tooltip() click to toggle source
# File lib/spoom/coverage/d3/timeline.rb, line 489
          def tooltip
            <<~JS
              function tooltip_#{id}(d) {
                tooltipTimeline(d, "methods");
              }
            JS
          end