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

Inherits:
Pie
  • Object
show all
Defined in:
lib/spoom/coverage/d3/pie.rb

Instance Method Summary collapse

Constructor Details

#initialize(id, title, snapshot) ⇒ Sigils

: (String id, String title, Snapshot snapshot) -> void



120
121
122
# File 'lib/spoom/coverage/d3/pie.rb', line 120

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

Instance Method Details

#tooltipObject

: -> String



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

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