Class: Spoom::Coverage::D3::Pie::Sigs
- Inherits:
-
Spoom::Coverage::D3::Pie
- Object
- Base
- Spoom::Coverage::D3::Pie
- Spoom::Coverage::D3::Pie::Sigs
- Defined in:
- lib/spoom/coverage/d3/pie.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(id, title, snapshot) ⇒ Sigs
constructor
: (String id, String title, Snapshot snapshot) -> void.
-
#tooltip ⇒ Object
: -> String.
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) ⇒ Sigs
: (String id, String title, Snapshot snapshot) -> void
157 158 159 160 161 162 163 |
# File 'lib/spoom/coverage/d3/pie.rb', line 157 def initialize(id, title, snapshot) super( id, title, { true: snapshot.methods_with_sig_excluding_rbis, false: snapshot.methods_without_sig_excluding_rbis } ) end |
Instance Method Details
#tooltip ⇒ Object
: -> String
167 168 169 170 171 172 173 174 175 176 |
# File 'lib/spoom/coverage/d3/pie.rb', line 167 def tooltip <<~JS function tooltip_#{id}(d) { tooltipPie( d, (d.data.key == "true" ? " with" : " without") + " a signature", "methods excluding RBIs", sum_#{id} ) } JS end |