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
: String.
Class Method Summary collapse
-
.header_script ⇒ Object
: -> String.
-
.header_style ⇒ Object
: -> String.
Instance Method Summary collapse
-
#html ⇒ Object
: -> String.
-
#initialize(id, data) ⇒ Base
constructor
: (String id, untyped data) -> void.
-
#script ⇒ Object
abstract
: -> String.
-
#tooltip ⇒ Object
: -> String.
Constructor Details
#initialize(id, data) ⇒ Base
: (String id, untyped data) -> void
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)
: String
10 11 12 |
# File 'lib/spoom/coverage/d3/base.rb', line 10 def id @id end |
Class Method Details
.header_script ⇒ Object
: -> String
25 26 27 |
# File 'lib/spoom/coverage/d3/base.rb', line 25 def header_script "" end |
.header_style ⇒ Object
: -> String
20 21 22 |
# File 'lib/spoom/coverage/d3/base.rb', line 20 def header_style "" end |
Instance Method Details
#html ⇒ Object
: -> String
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.
: -> String
45 |
# File 'lib/spoom/coverage/d3/base.rb', line 45 def script = raise NotImplementedError, "Abstract method called" |
#tooltip ⇒ Object
: -> String
39 40 41 |
# File 'lib/spoom/coverage/d3/base.rb', line 39 def tooltip "" end |