Class: Spoom::Coverage::D3::Pie::Sigils

Inherits:
Spoom::Coverage::D3::Pie show all
Extended by:
T::Sig
Defined in:
lib/spoom/coverage/d3/pie.rb

Instance Attribute Summary

Attributes inherited from Base

#id

Instance Method Summary collapse

Methods inherited from Spoom::Coverage::D3::Pie

header_script, header_style, #script

Methods inherited from Base

header_script, header_style, #html, #script

Constructor Details

#initialize(id, title, snapshot) ⇒ Sigils

Returns a new instance of Sigils.



127
128
129
# File 'lib/spoom/coverage/d3/pie.rb', line 127

def initialize(id, title, snapshot)
  super(id, title, snapshot.sigils_excluding_rbis.select { |_k, v| v })
end

Instance Method Details

#tooltipObject



132
133
134
135
136
137
138
# File 'lib/spoom/coverage/d3/pie.rb', line 132

def tooltip
  <<~JS
    function tooltip_#{id}(d) {
      tooltipPie(d, "typed: " + d.data.key, "files excluding RBIs", sum_#{id});
    }
  JS
end