Class: SimpleCov::Formatter::LcovFormatter
- Inherits:
-
Object
- Object
- SimpleCov::Formatter::LcovFormatter
- Defined in:
- lib/simplecov-lcov.rb
Overview
Custom Formatter to generate lcov style coverage for simplecov
Class Method Summary collapse
Instance Method Summary collapse
-
#format(result) ⇒ Object
generate lcov style coverage.
Class Method Details
.config {|@config| ... } ⇒ Object
28 29 30 31 32 |
# File 'lib/simplecov-lcov.rb', line 28 def config @config ||= SimpleCovLcov::Configuration.new yield @config if block_given? @config end |
.report_with_single_file=(value) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/simplecov-lcov.rb', line 34 def report_with_single_file=(value) = \ "#{caller(1..1).first} " \ "`#{LcovFormatter}.report_with_single_file=` is deprecated. " \ "Use `#{LcovFormatter}.config.report_with_single_file=` instead" warn config.report_with_single_file = value end |
Instance Method Details
#format(result) ⇒ Object
generate lcov style coverage.
Args
- result
- SimpleCov::Result
-
abcoverage result instance.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/simplecov-lcov.rb', line 15 def format(result) create_output_directory! if report_with_single_file? write_lcov_to_single_file!(result.files) else result.files.each { |file| write_lcov!(file) } end puts "Lcov style coverage report generated for #{result.command_name} to #{lcov_results_path}" end |