Sha256: 6bf73674ce3e4f7539e26cecf467d355455c3bc72f2c7c7569c810fb72afb219

Contents?: true

Size: 525 Bytes

Versions: 34

Compression:

Stored size: 525 Bytes

Contents

# frozen_string_literal: true

module DeepCover
  class Analyser::CoveredCodeSource < Analyser
    attr_reader :covered_code

    def initialize(covered_code)
      @covered_code = covered_code.freeze
    end

    # Looking exclusively at our subset of nodes, returns the node's direct descendants
    def node_children(node)
      node.children_nodes
    end

    # Returns the number of runs of the node (assumed to be in our subset)
    def node_runs(node)
      node.execution_count if node.executable?
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
deep-cover-core-1.1.0 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-1.0.0 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.8.1 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.8.0 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.10 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.9 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.8 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.7 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.6 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.5 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.4 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.3 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.2 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.1 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.7.0 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.6.4 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.6.3 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-core-0.6.3.pre lib/deep_cover/analyser/covered_code_source.rb
deep-cover-0.6.2 lib/deep_cover/analyser/covered_code_source.rb
deep-cover-0.6.1 lib/deep_cover/analyser/covered_code_source.rb