Class: Spoom::Coverage::D3::Base Abstract
- Inherits:
-
Object
- Object
- Spoom::Coverage::D3::Base
- Defined in:
- lib/spoom/coverage/d3/base.rb
Overview
This class is abstract.
Instance Attribute Summary collapse
- #id ⇒ Object readonly
Class Method Summary collapse
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(id, data) ⇒ Base
constructor
A new instance of Base.
- #script ⇒ Object abstract
- #tooltip ⇒ Object
Constructor Details
#initialize(id, data) ⇒ Base
Returns a new instance of Base.
13 14 15 16 |
# File 'lib/spoom/coverage/d3/base.rb', line 13 def initialize(id, data) @id = id @data = data end |
Instance Attribute Details
#id ⇒ Object (readonly)
10 11 12 |
# File 'lib/spoom/coverage/d3/base.rb', line 10 def id @id end |
Class Method Details
.header_script ⇒ Object
25 26 27 |
# File 'lib/spoom/coverage/d3/base.rb', line 25 def header_script "" end |
.header_style ⇒ Object
20 21 22 |
# File 'lib/spoom/coverage/d3/base.rb', line 20 def header_style "" end |
Instance Method Details
#html ⇒ Object
31 32 33 34 35 36 |
# File 'lib/spoom/coverage/d3/base.rb', line 31 def html <<~HTML <svg id="#{id}"></svg> <script>#{script}</script> HTML end |
#script ⇒ Object
This method is abstract.
45 |
# File 'lib/spoom/coverage/d3/base.rb', line 45 def script = raise NotImplementedError, "Abstract method called" |
#tooltip ⇒ Object
39 40 41 |
# File 'lib/spoom/coverage/d3/base.rb', line 39 def tooltip "" end |