Class: Spoom::Coverage::D3::Base
- Inherits:
-
Object
- Object
- Spoom::Coverage::D3::Base
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/spoom/coverage/d3/base.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(id, data) ⇒ Base
constructor
A new instance of Base.
- #script ⇒ Object
- #tooltip ⇒ Object
Constructor Details
#initialize(id, data) ⇒ Base
Returns a new instance of Base.
17 18 19 20 |
# File 'lib/spoom/coverage/d3/base.rb', line 17 def initialize(id, data) @id = id @data = data end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/spoom/coverage/d3/base.rb', line 14 def id @id end |
Class Method Details
.header_script ⇒ Object
28 29 30 |
# File 'lib/spoom/coverage/d3/base.rb', line 28 def self.header_script "" end |
.header_style ⇒ Object
23 24 25 |
# File 'lib/spoom/coverage/d3/base.rb', line 23 def self.header_style "" end |
Instance Method Details
#html ⇒ Object
33 34 35 36 37 38 |
# File 'lib/spoom/coverage/d3/base.rb', line 33 def html <<~HTML <svg id="#{id}"></svg> <script>#{script}</script> HTML end |
#script ⇒ Object
46 |
# File 'lib/spoom/coverage/d3/base.rb', line 46 def script; end |
#tooltip ⇒ Object
41 42 43 |
# File 'lib/spoom/coverage/d3/base.rb', line 41 def tooltip "" end |