class Spoom::Coverage::D3::Timeline::Calls
def initialize(id, snapshots)
def initialize(id, snapshots) keys = ['false', 'true'] data = snapshots.map do |snapshot| { timestamp: snapshot.commit_timestamp, commit: snapshot.commit_sha, total: snapshot.calls_typed + snapshot.calls_untyped, values: { true: snapshot.calls_typed, false: snapshot.calls_untyped }, } end super(id, data, keys) end
def tooltip
def tooltip <<~JS function tooltip_#{id}(d) { tooltipTimeline(d, "calls"); } JS end