Sha256: 05588d8b811bfd120f5398a8cb2cb16fbe7e9a8f39e6e99736e41999fae47e27

Contents?: true

Size: 961 Bytes

Versions: 19

Compression:

Stored size: 961 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Spoom
  module Coverage
    module D3
      class Base
        extend T::Sig
        extend T::Helpers

        abstract!

        sig { returns(String) }
        attr_reader :id

        sig { params(id: String, data: T.untyped).void }
        def initialize(id, data)
          @id = id
          @data = data
        end

        class << self
          extend T::Sig

          sig { returns(String) }
          def header_style
            ""
          end

          sig { returns(String) }
          def header_script
            ""
          end
        end

        sig { returns(String) }
        def html
          <<~HTML
            <svg id="#{id}"></svg>
            <script>#{script}</script>
          HTML
        end

        sig { returns(String) }
        def tooltip
          ""
        end

        sig { abstract.returns(String) }
        def script; end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
spoom-1.5.0 lib/spoom/coverage/d3/base.rb
spoom-1.4.2 lib/spoom/coverage/d3/base.rb
spoom-1.4.1 lib/spoom/coverage/d3/base.rb
spoom-1.4.0 lib/spoom/coverage/d3/base.rb
spoom-1.3.3 lib/spoom/coverage/d3/base.rb
spoom-1.3.2 lib/spoom/coverage/d3/base.rb
spoom-1.3.1 lib/spoom/coverage/d3/base.rb
spoom-1.3.0 lib/spoom/coverage/d3/base.rb
spoom-1.2.4 lib/spoom/coverage/d3/base.rb
spoom-1.2.3 lib/spoom/coverage/d3/base.rb
spoom-1.2.2 lib/spoom/coverage/d3/base.rb
spoom-1.2.1 lib/spoom/coverage/d3/base.rb
spoom-1.2.0 lib/spoom/coverage/d3/base.rb
spoom-1.1.16 lib/spoom/coverage/d3/base.rb
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/spoom-1.1.15/lib/spoom/coverage/d3/base.rb
spoom-1.1.15 lib/spoom/coverage/d3/base.rb
spoom-1.1.14 lib/spoom/coverage/d3/base.rb
spoom-1.1.13 lib/spoom/coverage/d3/base.rb
spoom-1.1.12 lib/spoom/coverage/d3/base.rb