Module: RubyVPI::Coverage

Defined in:
lib/ruby-vpi/rcov.rb

Overview

:nodoc:

Constant Summary collapse

@@analyzer =
Rcov::CodeCoverageAnalyzer.new
@@handlers =
[]

Class Method Summary collapse

Class Method Details

.attach(&aBlock) ⇒ Object

Invokes the given block after code coverage analysis has completed.

Raises:

  • (ArgumentError)


40
41
42
43
# File 'lib/ruby-vpi/rcov.rb', line 40

def Coverage.attach &aBlock # :yield: Rcov::CodeCoverageAnalyzer
  raise ArgumentError unless block_given?
  @@handlers << aBlock if aBlock
end

.startObject



28
29
30
# File 'lib/ruby-vpi/rcov.rb', line 28

def Coverage.start
  @@analyzer.install_hook
end

.stopObject



32
33
34
# File 'lib/ruby-vpi/rcov.rb', line 32

def Coverage.stop
  @@analyzer.remove_hook
end