Class: Spoom::Coverage::D3::Pie::Calls
- Inherits:
-
Spoom::Coverage::D3::Pie
- Object
- Base
- Spoom::Coverage::D3::Pie
- Spoom::Coverage::D3::Pie::Calls
- Defined in:
- lib/spoom/coverage/d3/pie.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(id, title, snapshot) ⇒ Calls
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) ⇒ Calls
: (String id, String title, Snapshot snapshot) -> void
140 141 142 |
# File 'lib/spoom/coverage/d3/pie.rb', line 140 def initialize(id, title, snapshot) super(id, title, { true: snapshot.calls_typed, false: snapshot.calls_untyped }) end |
Instance Method Details
#tooltip ⇒ Object
: -> String
146 147 148 149 150 151 152 |
# File 'lib/spoom/coverage/d3/pie.rb', line 146 def tooltip " function tooltip_\#{id}(d) {\n tooltipPie(d, d.data.key == \"true\" ? \" checked\" : \" unchecked\", \"calls\", sum_\#{id})\n }\n JS\nend\n" |