Sha256: dee24f413eaa8ca3c4db8ebc9ba0548c15e187ed3384bb20171596d3bb07609f

Contents?: true

Size: 912 Bytes

Versions: 2

Compression:

Stored size: 912 Bytes

Contents

# Code coverage analysis.
#--
# Copyright 2006-2007 Suraj N. Kurapati
# See the file named LICENSE for details.

require 'rcov'

# satisfy dependencies of 'rcov/report'
  require 'xx'

  module XX # :nodoc: all
    module XMLish
      include Markup

      def xmlish_ *a, &b
        xx_which(XMLish){ xx_with_doc_in_effect(*a, &b)}
      end
    end
  end

  require 'cgi'

require 'rcov/report'


module RubyVpi
  COVERAGE_ANALYSIS = Rcov::CodeCoverageAnalyzer.new
  COVERAGE_ANALYSIS.install_hook

  COVERAGE_ANALYSIS_HANDLERS = []

  at_exit do
    COVERAGE_ANALYSIS.remove_hook

    COVERAGE_ANALYSIS_HANDLERS.each do |a|
      a.call COVERAGE_ANALYSIS
    end
  end

  # Invokes the given block, which yields COVERAGE_ANALYSIS, after code coverage
  # analysis has completed.
  def RubyVpi.with_coverage_analysis &aBlock # :nodoc:
    if aBlock
      COVERAGE_ANALYSIS_HANDLERS << aBlock
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-vpi-16.0.0 lib/ruby-vpi/rcov.rb
ruby-vpi-16.0.1 lib/ruby-vpi/rcov.rb