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
: 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
-
#tooltip ⇒ Object
: -> String.
Constructor Details
#initialize(id, data) ⇒ Base
: (String id, untyped data) -> void
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)
: String
14 15 16 |
# File 'lib/spoom/coverage/d3/base.rb', line 14 def id @id end |
Class Method Details
.header_script ⇒ Object
: -> String
29 30 31 |
# File 'lib/spoom/coverage/d3/base.rb', line 29 def header_script "" end |
.header_style ⇒ Object
: -> String
24 25 26 |
# File 'lib/spoom/coverage/d3/base.rb', line 24 def header_style "" end |
Instance Method Details
#html ⇒ Object
: -> String
35 36 37 38 39 40 |
# File 'lib/spoom/coverage/d3/base.rb', line 35 def html <<~HTML <svg id="#{id}"></svg> <script>#{script}</script> HTML end |
#script ⇒ Object
48 |
# File 'lib/spoom/coverage/d3/base.rb', line 48 def script; end |
#tooltip ⇒ Object
: -> String
43 44 45 |
# File 'lib/spoom/coverage/d3/base.rb', line 43 def tooltip "" end |