Sha256: 5d1fbe35ee513a2ca99f43e4a0bc9bcecc7ceb3c3615caa72bb04606b08549f3

Contents?: true

Size: 896 Bytes

Versions: 17

Compression:

Stored size: 896 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

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

        sig { returns(String) }
        def self.header_script
          ""
        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

17 entries across 17 versions & 1 rubygems

Version Path
spoom-1.1.11 lib/spoom/coverage/d3/base.rb
spoom-1.1.10 lib/spoom/coverage/d3/base.rb
spoom-1.1.9 lib/spoom/coverage/d3/base.rb
spoom-1.1.8 lib/spoom/coverage/d3/base.rb
spoom-1.1.7 lib/spoom/coverage/d3/base.rb
spoom-1.1.6 lib/spoom/coverage/d3/base.rb
spoom-1.1.5 lib/spoom/coverage/d3/base.rb
spoom-1.1.4 lib/spoom/coverage/d3/base.rb
spoom-1.1.3 lib/spoom/coverage/d3/base.rb
spoom-1.1.2 lib/spoom/coverage/d3/base.rb
spoom-1.1.1 lib/spoom/coverage/d3/base.rb
spoom-1.1.0 lib/spoom/coverage/d3/base.rb
spoom-1.0.9 lib/spoom/coverage/d3/base.rb
spoom-1.0.8 lib/spoom/coverage/d3/base.rb
spoom-1.0.7 lib/spoom/coverage/d3/base.rb
spoom-1.0.6 lib/spoom/coverage/d3/base.rb
spoom-1.0.5 lib/spoom/coverage/d3/base.rb